Hello, im trying to get indicator to show sell arrow when bid is less than previous candlestick low , with the other ema conditions in place, can anyone assist why its showing arrows too many times when bid hasnt moved below candle [1]?
"Bid" has only the current value.
Your program checks the condition using the current Bid value, even for past bars.
-
Why did you post your MT4 question in the MT5 Indicators section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. -
int limit = rates_total - prev_calculated; ⋮ limit++; //--- 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
You can drop the convoluted code by doing your lookbacks correctly #9 — #14 & #19 .
-
Why did you post your MT4 question in the MT5 Indicators section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. - You can drop the convoluted code by doing your lookbacks correctly #9 — #14 & #19 .
thanks WIlliam, didnt see mt4 section the forum layout is really messy for me but i will take a look and post it there thanks
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)
Im not trying to repaint arrows, Im trying to paint 1 arrow when price crosses below low of previous candle and is above emas. Im hopeing to make this into an EA next so the arrows are purely for debugging the signals and they are not working the way I would like yet
- No one said anything about repaint.
- The current market Bid has nothing to do with what you want. There is no “when”, that is thinking current; Think about the past, “if” it crossed.
- Price crossed below the low of the previous candle, if the high was above and the new low is below.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, im trying to get indicator to show sell arrow when bid is less than previous candlestick low , with the other ema conditions in place, can anyone assist why its showing arrows too many times when bid hasnt moved below candle [1]?