I just this code to check if current price hits a support line and draw an arrow on the chart in such case:
int start()
{
if(Bars<=3) return(0);
int ExtCountedBars=IndicatorCounted();
if (ExtCountedBars<0) return(-1);
int current=Bars-2;
if(ExtCountedBars>2) current=Bars-ExtCountedBars-1;
while(current>=0)
{
if
(
iLow(NULL, 0, current)<=ObjectGetValueByShift("AllPivots S1[0]", current)
The support line is displayed via another Indicator. The arrow is generally printed properly but just for the current H1 line. If i look more back (lets say 3 hours back) then the Support indicator will correctly display the old H1-support line but the arrow will still be based on the current support line.
In my opinion there are 2 problems: 1) The lines have individual numbers (current H1 line has[0], previous has [1] and so on) 2) different timeframes might mix things up.
Is there a way to combine current timeframes Low with the specific H1 support line that was valid at that time ?
I am not sure if i expressed myself correct. English is not my first language...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello Experts :-)
I just this code to check if current price hits a support line and draw an arrow on the chart in such case:
int start() { if(Bars<=3) return(0); int ExtCountedBars=IndicatorCounted(); if (ExtCountedBars<0) return(-1); int current=Bars-2; if(ExtCountedBars>2) current=Bars-ExtCountedBars-1; while(current>=0) { if ( iLow(NULL, 0, current)<=ObjectGetValueByShift("AllPivots S1[0]", current)The support line is displayed via another Indicator. The arrow is generally printed properly but just for the current H1 line.
If i look more back (lets say 3 hours back) then the Support indicator will correctly display the old H1-support line but the arrow will still be based on the current support line.
In my opinion there are 2 problems:
1) The lines have individual numbers (current H1 line has[0], previous has [1] and so on)
2) different timeframes might mix things up.
Is there a way to combine current timeframes Low with the specific H1 support line that was valid at that time ?
I am not sure if i expressed myself correct. English is not my first language...
Thanks in advance for any hints.
Stefan