Binary options backtest
-
Hi guys,
I 'm new to fxdreemea.
I just want to make EA to backtest.
Conditions are;
On M5 chart,-
1st candle (eg 13:00:00 open) :
a) RSI crosses level10 at candle close (eg 13:04:59)
b) Draw arrow when RSI crosses 10 -
2nd candle (eg 13:05:00 open) :
a) buy at candle open
b) sell at candle close (eg 13:09:59)
https://fxdreema.com/shared/OtxCQ47Tb
I've tried but couldn't make it to the exact specifications as above.
Instead of drawing arrows when crosses, it draws 2 candles after.
Instead of buying at the open and selling at the close of next candle, it buys at the candle one after and it sells at the open 2 candles after.Could anyone help?
-
-
@inquiry I think your specs are not accurate enough.
Are you sure about rsi crossing 10 as that rarely happening with default period of 14? And in which direction should it cross?
From below 10 x> 10?
From above 10 x< 10?However, your code works quiet well, if you reduce the RSI indicator's period.

Or do you expect something else?
-
Thank you very much for your post.
As I wanted to make a template to test various specs, indicators and time frames, I'd like basically 1) signal appears, 2) buy at the beginning of next candle, 3) sell at the end of the same candle as 2).
But without putting actual figures in I can't check the result so I mentioned- Time frame M5
- RSI to have been crossed 10 from above on close of the first candle
- Buy at open of the next candle
- Sell at close of the next candle
Arrow signals can be disregarded for now.
I am not a native English speaker so please forgive me if I sound too dull.
-
@inquiry For what I see, you get the arrow late because you specified candle ID2 in the blocks # 1 and # 28, change this value to candle ID1
-
@ambrogio Thank you so much.
I've changed candle IDs and it works as I wanted.
You saved me a lot of time as I was going to backtest using excel. ;-o) -
@trader-philipps
When I replied to you there were no screen shot on your reply.
Thank you very much for testing my code