|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
More periods for backtesting |
aspirator
|
Post subject: More periods for backtesting |
Post rating: 0
|
Posted: Mon 27 May, 2013, 07:20
|
|
User rating: 0
Joined: Mon 17 Sep, 2012, 14:05 Posts: 25
|
Hello!
You already told me about how to set up more periods (2h, 4h, ...). When I use a @Configurable-Tag as period, I don't have those periods available. Only the "normal" ones such as 4h, daily, weekly are selectable.
Please help...
|
|
|
|
 |
API Support
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Mon 27 May, 2013, 07:43
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
aspirator
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Mon 27 May, 2013, 07:49
|
|
User rating: 0
Joined: Mon 17 Sep, 2012, 14:05 Posts: 25
|
That's nice!
Thank you!
Is there an example available?
|
|
|
|
 |
API Support
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Mon 27 May, 2013, 08:38
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
aspirator
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Tue 28 May, 2013, 14:15
|
|
User rating: 0
Joined: Mon 17 Sep, 2012, 14:05 Posts: 25
|
Hello!
Unfortunately, this is not what I requested. Would you be so kind as to provide an example how to set up a 2h period?
Thank you!
|
|
|
|
 |
API Support
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Tue 28 May, 2013, 14:39
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
If you encounter any problems in implementing the custom period usage, please provide an example strategy of yours such that we can advise you how to fix them.
|
|
|
|
 |
aspirator
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Tue 28 May, 2013, 14:55
|
|
User rating: 0
Joined: Mon 17 Sep, 2012, 14:05 Posts: 25
|
OK, there you go:
console.getOut().println(indicators.mama(Instrument.EURUSD, Period.createCustomPeriod(Unit.Hour, 2), OfferSide.BID, IIndicators.AppliedPrice.OPEN, 0.5, 0.3, 0)[0]);
Yields NaN.
console.getOut().println(indicators.mama(Instrument.EURUSD, Period.createCustomPeriod(Unit.Hour, 1), OfferSide.BID, IIndicators.AppliedPrice.OPEN, 0.5, 0.3, 0)[0]);
Does work!
|
|
|
|
 |
API Support
|
Post subject: Re: More periods for backtesting |
Post rating: 0
|
Posted: Tue 28 May, 2013, 14:59
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|