Hello again, I have found a solution, like this one:
if(TimeDay(Time[i]) != TimeDay(Time[i+1]) && free!=2) { free=2; P = (LastHigh + LastLow + Close[i+1])/3; LastLow = Open[i]; LastHigh = Open[i]; } if(TimeDay(Time[i]) == TimeDay(Time[i+1])){ fee=1; }Now it only works one Tick long and first if the days have change it will be make free for new run-up
![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
with next example you can get the High,Low and Closerate of the day.
Now if the day change just for the first Tick you have in the variables LastHigh and LastLow the real rates, because if the next Tick comes in the variables LastHigh and LastLow will get just the low and high from the last bar in chart and not any more the rates from the last day, that ist because the variables LastLow and LastHigh get the rate from Open[i] along below.
Now i need a solution how i can let just for one tick all drain happens.
But at the next day if result of
is again true all must happens from the beginning.