
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
The current bar is always the one "receiving the ticks" (for minute bars from hh:mm:00 to hh:mm:59, for 10min bars from hh:m0:00 to hh:m9:59 and so on).
So the previous bar is last completed bar.
The price is an array of prices, the type ( open, close, mean and so on) you choose on the indicator setup.
So if you choose "open" you will always receive the opening price of the current bar, if you choose "close" you will receive always the last tick as the price.
Include the code in an indicator and "experiment" yourself.
Regards Uwe
The price is not a problem, the array provided with OnCalculate gives you price for each bar.
As I explained in my previous, and I can't be more clear than that, you have rewrite your calculations. Do you understood what I explained in this post ? You don't have to save all ema values, but at least this of the last bar.
I think I understood it partly, now the indicator works but I think i did not solved the problem I just bypassed it.
the problem for me is: I don't know in the code how to know when the onCalculate starts to be called on new realtime (onTick) data and when instead is called on each bar on historical data.
so I used this very bad patch:
by the way I red that your job is to make mql5 programs upon request, how much is your rate? and do you teach as well? in case you do how much is your rate?
I think I understood it partly, now the indicator works but I think i did not solved the problem I just bypassed it.
the problem for me is: I don't know in the code how to know when the onCalculate starts to be called on new realtime (onTick) data and when instead is called on each bar on historical data.
so I used this very bad patch:
by the way I red that your job is to make mql5 programs upon request, how much is your rate? and do you teach as well? in case you do how much is your rate?
See your a PM.
sorry. what does it mean?
Anyway I made the following changes :
You have to check if that works.
Anyway I made the following changes :
You have to check if that works.