Re: MT4 Indicator requests and ideas

12623
mrtools wrote: Wed Mar 03, 2021 2:55 am Posted here Heiken Ashi
Hi ,this is part of the code which draws arrows once the price touches the tma channel indicating bearing or bulling candles, but the arrow is set on a current candle which is constantly changing ,
HOW can i set it so that the code in the IF STATEMENTS below only exceutes after candle close ?can you please help.
if(i > 0) {
if(high[i-1] > tmau[i-1] && close[i-1] > open[i-1] && close < open) {
ReboundD = high + AtrMultiplier*atr/2;
if(tmac - tmac[i-1] > TMAangle*_Point) Caution = ReboundD + 10*_Point;
}
if(low[i-1] < tmad[i-1] && close[i-1] < open[i-1] && close > open) {
ReboundU = low[i] - AtrMultiplier*atr/2;
if(tmac[i-1] - tmac[i] > TMAangle*_Point) Caution[i] = ReboundU[i] - 10*_Point;
}
}

Re: MT4 Indicator requests and ideas

12624
Kyodah wrote: Tue Apr 13, 2021 9:43 pm Hi ,this is part of the code which draws arrows once the price touches the tma channel indicating bearing or bulling candles, but the arrow is set on a current candle which is constantly changing ,
HOW can i set it so that the code in the IF STATEMENTS below only exceutes after candle close ?can you please help.
if(i > 0) {
if(high[i-1] > tmau[i-1] && close[i-1] > open[i-1] && close < open) {
ReboundD = high + AtrMultiplier*atr/2;
if(tmac - tmac[i-1] > TMAangle*_Point) Caution = ReboundD + 10*_Point;
}
if(low[i-1] < tmad[i-1] && close[i-1] < open[i-1] && close > open) {
ReboundU = low[i] - AtrMultiplier*atr/2;
if(tmac[i-1] - tmac[i] > TMAangle*_Point) Caution[i] = ReboundU[i] - 10*_Point;
}
}


If that is mt4 looks like you are possibly trying to look into the future and if using a centered tma would make the repaintingf/recalculation worse.




Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot], COGSY, CommonCrawl [Bot], DotNetDotCom [Bot], horizon202, LUCAS123 and 44 guests