if (ThisBarTrade != Bars) {
You do not assign a new value to ThisBarTrade, so the above condition will always be true
You do not assign a new value to ThisBarTrade, so the above condition will always be true
Like this
if (ThisBarTrade != Bars) { ThisBarTrade = Bars;
Thank you to everyone for your help. I was able to use your advise to fix the problem.
Many thanks!
Bars is unreliable (a refresh/reconnect can change number of bars on chart) volume is unreliable (miss ticks) Always use time. New candle - MQL4 forum
You are wrong(again).
Explain why.
Daily chart has Thursday and Friday. Bars = 2.
New history comes in. Chart now has Tuesday, Wednesday, Thursday, Friday. Bars now equals 4.
Bars changed but it is still Friday. No new daily bar.
Explain why.
Daily chart has Thursday and Friday. Bars = 2.
New history comes in. Chart now has Tuesday, Wednesday, Thursday, Friday. Bars now equals 4.
Bars changed but it is still Friday. No new daily bar.
Waste of time. This guy NEVER listen, he must have some brain bugs.
Waste of time. This guy NEVER listen, he must have some brain bugs.
Explain why.
Daily chart has Thursday and Friday. Bars = 2.
New history comes in. Chart now has Tuesday, Wednesday, Thursday, Friday. Bars now equals 4.
Bars changed but it is still Friday. No new daily bar.
Why no new day? Tuesday && Wednesday:)))))))
Do you agree with me that if history updates we need to recalulate data(especially in indicators)?
I understand about what you talking mounth ago. But i am talking about another thing.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am having issue with the attached EA trading multiple times per bar. I only want it to place max one trade per bar. I have tried to edit the code but it still seems not to work.
Please could someone have a look and tell me where I have gone wrong?
Many thanks.