LéoParticipant
Average
Thank you Nicolas,
Cf the code below.
It seems to work well on index but not on currencies – need to figure out why !
Thank you again.
Defparam cumulateorders = false
//
ATR = AverageTrueRange[14](close)
Period = 1000
boxsize = average[period](ATR)
once topprice = close
once bottomprice = close - boxsize
if(high > topprice + boxsize*2) THEN
topprice = close
bottomprice = topprice - boxsize*2
ELSIF (low < bottomprice - boxsize*2) THEN
bottomprice = close
topprice = bottomprice + boxsize*2
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
buy at topprice + boxSize stop
sellshort at bottomprice - boxSize stop
Everything works fine for me, I put the indicator code for you to test the size of the renko boxes on the graph:
ATR = AverageTrueRange[14](close)
Period = 1000
boxsize = average[period](ATR)
once topprice = close
once bottomprice = close - boxsize
if(high > topprice + boxsize*2) THEN
topprice = close
bottomprice = topprice - boxsize*2
ELSIF (low < bottomprice - boxsize*2) THEN
bottomprice = close
topprice = bottomprice + boxsize*2
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
return topprice,bottomprice
LéoParticipant
Average
Merci Nicolas !
I will use the indicator and the code.
When applying this kind of code to forex should I use the “pipsize” code ?
Thank you again
Best regards.
No, because the ATR value is in price and doesn’t need to be converted.
Hello Nicolas,
Thank you for your work on the Renko code.
Could you show me please how to modify Renko code so that in certain situations, the system only takes Short trades (e.g.) moving averages trending down.
And in other situations it only takes long trades.
Thank you.
Hoe kan ik de Renko bar formule implementeren in een autotrading formule met een “Call Functie” ?
How can I implement the Renko bar formula in an autotrading formula with a “Call Function” ?
@Sterk
Only post in the language of the forumthat you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Thank you 🙂
Nicolas,
How can I implement the “Renko candles with the ATR” into my strategy with a “call function” .
Thank you in advance.