Logic (true-false) block not behaving as I expected
-
Hi everyone,
https://fxdreema.com/shared/P2p5QJbD
Newbie to fxdreema here. Getting to grips with the blocks etc and trying to build and replicate some existing strategies I have coded myself.
I was trying to implement a custom indicator and in doing so used a logic block. Very simple test....if true then use custom indicator and buy, if false sell.
When I run it it sells all the time regardless of how the flag is set. What am I doing wrong?
E
-
You have nothing setting that flag, default will be false, meaning this is the only option that will create a trade.
-
@jstap Hmm, OK. I set up a constant called use_regime as an input variable. I intended for the user to be able to set either true or false before running the EA. I'm guessing I haven't done that correctly? I selected the constant in the logic block, what am I doing wrong?
-
I've managed to sort it. Used a condition block instead of a flags block. Im guessing the flags block just checks flags that are set by a set block.
-
Yes, most either check what you have set, or check a condition that changes by it's self.