Renko code

Questions about MultiCharts and user contributed studies.
fernando43611
Posts: 33
Joined: 12 Mar 2015
Has thanked: 4 times

Renko code

Postby fernando43611 » 21 Mar 2015

Hi, is there a way to create a signal/strategy that consists in:
1. buy when the second green (bullish) brick/box appears in a renko chart
2. sell/sell short when the second red (bearish) brick/box appears

I've been searching around the forum to see if its already been posted but just couldn't find anything.
anyway, any help will be appreciated.

thanks

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 35 times

Re: Renko code

Postby MC_Prog » 21 Mar 2015

Of course, and it's trivial.

I'd suggest having a go at it. If you truly get stuck (unlikely, IMO) you can always post back with the code you tried and someone will likely comment to assist.

Erik Pepping
Posts: 74
Joined: 25 Aug 2007
Been thanked: 6 times

Re: Renko code

Postby Erik Pepping » 22 Mar 2015

This should be easy, but bricks appearing is not clear to me.
Better is maybe "has appeared", so you are sure there are two red bricks, so when the third brick appears after two red ones go short ? ( this means the two red one will stay on your chart)

Erik

Erik Pepping
Posts: 74
Joined: 25 Aug 2007
Been thanked: 6 times

Re: Renko code

Postby Erik Pepping » 22 Mar 2015

This does it.
Tested on the dax for 7 days in backtesting mode, with profit and stop to 200, profit 23000. See report (boxsize =2)
But i have tried this one a long time real time. it is difficult to make system on renko, because the real prices are spiking an dipping witin a bar depending on a box size.


Inputs: xProfit(200),xStoploss(200);

setprofittarget(xProfit);
setstoploss(XStoploss);

if marketposition=0 then
begin
if close < open and close [1] < open [1] then
sellshort ("SE") this bar close;
if close > open and close [1] > open [1] then
buy ("LE") this bar close;
end;
Attachments
DaxFuturePerformance7days.png
(94.07 KiB) Downloaded 708 times

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Renko code

Postby MAtricks » 23 Mar 2015

For testing purposes, take out the Profit Target and Stop Loss code all together. It will create false results unless done perfectly.

To buy on a green renko and sell on a red renko:

Code: Select all

If C=H then buy this bar ;
if C=L then sellshort this bar ;


Return to “MultiCharts”