Problem with variables
-
HI all, i hope someone can see what ive done wrong, im trying to create an EA that trades the high of an imbalance candle if its above the 20ema and low of the candle if below the 20 ema, ive tested it with orders and it works great but when i create it with modify variables the same strategy doesn't work the same as it should.
with Modify variables - https://fxdreema.com/shared/n6e1rHmae
with entry orders -https://fxdreema.com/shared/Hhe57IGXTIA!
-
@jl516 Blocks 20 and 6 are the problem. You are comparing candle ID 1 high/low with candle ID 0's EMA. You should also specify candle ID 1 for the EMA.
-
@l-andorrà Thanks for your reply do you mean blocks 3 and 6 so just change the EMA to ID 1 on both of them? As i have now done that but im still not getting the same as i do with orders so something still doesn't seem correct?
https://fxdreema.com/shared/m1wAx5V2b -
-
@jl516 Please look at block 13 & 17. try change from "cross above" to "is above".
-
@jl516 I guess the problem is with the way those variables are initialized. You should use a 'comment(ugly)' block showing their values on backtest. Additionally, you can remove both 'once per tick' blocks. They are redundant.
-
@kebox87 Thanks for your help, this has helped to some extent but its still way off what it should be when trading it with orders any ideas why?
-
Its not taking a trade on each candle either so if im already in a trade it wont take another
-
@l-andorrà thank you, i also want it to take trades while a current trade is still running whats the best way to do that? thanks
-
Can you please share the latest version of it?
-