rodrigosm:
I would like to know how can I execute a calculus only once per bar.
//if((Fast_Trend_Line[i]> Slow_Trend_Line[i]) && (CurrentBar==NewBar_Time)) if(Fast_Trend_Line[i]> Slow_Trend_Line[i]) { // count_up++; // count_down=0; Per_Up[i]=Per_Up[i+1]+1; Per_Down[i]=0; } else { // count_up=0; // count_down++; Per_Down[i]=Per_Down[i+1]+1; Per_Up[i]=0; } // Per_Up[i]=count_up; // Per_Down[i]=count_down;
WHRoeder:
You don't for an indicator
You don't for an indicator
Thank you WHRoeder, I will test it tomorrow. It makes sense.
WHRoeder:
You don't for an indicator
You don't for an indicator
Thank you, worked.... the other way is usefful only for experts?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I would like to know how can I execute a calculus only once per bar.
I was trying to compare current time to last bar beginning time, but it did not work and to me it makes no sense.
I already read others posts here, but I could not find any solution that worked.
Thanks