I'm start to learn basics to construction an Expert, and it's going well so far. Eevery day some options become clearer and easy to understand, but others, not so much.
Need to know how to detect the exact moment when a candle is closed... and otherwise, also when a new candle starts.
Need this because my strategy works on the closing event of a candle, and open trade on starting next candle!
I do a previous search here on the forum and found a lot of information, but not cleared or inserted on much code... and don't understand !
Use this when checking if the candle has opened before you send your orders:
static int BarsOnChart=0;
Great my friend. Thanks.
Now i need to know how to detect the end of the candle... or in the detection of new candle check the confluences of my strategy on previous candle.
static datetime time0; bool isNewBar = time0 != Time; time0 = Time;
To add comments, please log in or register