imamushroom:
If you know how to do it in an EA, then just do the same in an indicator.
Hi,
Could someone please show me how I can detect and only execute something at the open of a new bar please?
I know how to do it in an EA but struggling with an indicator (it's the first indicator I've written!)
Thanks in advance.
imamushroom:
Hi,
Could someone please show me how I can detect and only execute something at the open of a new bar please?
I know how to do it in an EA but struggling with an indicator (it's the first indicator I've written!)
Thanks in advance.
int prevbars; ////////////////////////////////////////////////////////////////// int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[], const double &low[],const double &close[],const long &tick_volume[],const long &volume[],const int &spread[]) { //new bar if(Bars==prevbars) return(rates_total); prevbars=Bars;

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,
Could someone please show me how I can detect and only execute something at the open of a new bar please?
I know how to do it in an EA but struggling with an indicator (it's the first indicator I've written!)
Thanks in advance.