fabian waldo: time it is drawing an arrow on every single bar even though range1 is below points2. What am I doing wrong here....?
double Range1 = High[iHighest(NULL,0,MODE_HIGH,2,0)] - Low[iLowest(NULL,0,MODE_LOW,2,0)]; double points2 = 0.0009; : CrossUp[i] = ...
- If the range for the last two candles is above 9 pips, you draw an arrow at every candle.
- Don't hard code numbers, code breaks on JPY pairs. You are not
adjusting
SL, TP, and slippage; for 4/5 digit brokers
and for JPY pairs.
double pip = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
int pipsToPoints = int(pip / _Point);
int pipDigits = (int)MathLog10(pipsToPoints);
int slippage = 3 * pipsToPoints;
double points2 = 9 * pip;
whroeder1:
- If the range for the last two candles is above 9 pips, you draw an arrow at every candle.
- Don't hard code numbers, code breaks on JPY pairs. You are not
adjusting
SL, TP, and slippage; for 4/5 digit brokers
and for JPY pairs.
double pip = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
int pipsToPoints = int(pip / _Point);
int pipDigits = (int)MathLog10(pipsToPoints);
int slippage = 3 * pipsToPoints;
double points2 = 9 * pip;
Thanks for help. I am aware of digits and jpy, and only using this for EUR/USD on 5 digit - so it is not necessary to implement that code right now.
In regards to 'Crossup[i]' it should only draw an arrow below a candle where previous range of last 2 bars is above 9 pips. However it is drawing it on every bar...
Any other advice/ help much appreciated!! Thanks.
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
I am using a movement range filter of pips over given period, using ihigh and ilow.
When I use 'Comment' to get Range1 it is showing me correct value in terminal. But at the same time it is drawing an arrow on every single bar even though range1 is below points2. What am I doing wrong here....?