ArraySetAsSeries(Buffer1, true); ArraySetAsSeries(Buffer2, true); ArraySetAsSeries(open, true); ArraySetAsSeries(high, true); ArraySetAsSeries(low, true); ArraySetAsSeries(close,true); //--- initial zero if(prev_calculated < 1) { ArrayInitialize(Buffer1, 0); ArrayInitialize(Buffer2, 0); } else limit++; if(CopyBuffer(Pecas_handle, 0, 0, rates_total, Pecas) <= 0) return(rates_total); ArraySetAsSeries(Pecas, true); if(CopyBuffer(Pecas_handle, 4, 0, rates_total, Pecas_4) <= 0) return(rates_total); ArraySetAsSeries(Pecas_4, true); //if(CopyLow(Symbol(), PERIOD_CURRENT, 0, rates_total, Low) <= 0) return(rates_total); //ArraySetAsSeries(Low, true); if(CopyBuffer(Pecas_handle, 3, 0, rates_total, Pecas_3) <= 0) return(rates_total); ArraySetAsSeries(Pecas_3, true); //if(CopyHigh(Symbol(), PERIOD_CURRENT, 0, rates_total, High) <= 0) return(rates_total); //ArraySetAsSeries(High, true); //--- main loop for(int i = limit-1; i >= 0; i--) { if (i >= MathMin(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation //Indicator Buffer 1 if(Pecas[i] < Pecas_4[i] && close[i] < open[i] //Pecas < Pecas ) { Buffer1[i] = low[i]; //Set indicator value at Candlestick Low } else { Buffer1[i] = 0; }
Ernst Van Der Merwe:
Thanks it worked great!
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
Hello, how can I make the arrow appear only when the candle is opposite .. for example if the arrow is down the candle has to be green.
sorry for my bad English.
I leave an image so that you understand me better:
this is my mq5 code:
thanks in advance.