I’m back experimenting in renko-land. I think there’s potential in this. Has anyone experimented with running simultaneous strategies with different box sizes? I.e, backtest show a nice equity curve with box size 50, then launch 5 strategies with small lot size at renko box 40, 45, 50, 55, 60? one could experiment with different trailing stop settings on each strategy too to diversify further. I get a really nice equity curve with Doctrading “Pure Renko” strategy. I still believe that having a dynamic box size is better but haven’t yet figured it out. Maybe if one look at the relationship between a moving average and the daily price with a multiplier?
I will launch some bots in demo and will let you know what the results are.
As always, any ideas would be welcome.
I been experience 0.1 % setting with 10MA. If 2 boxes crosses over MA entry buy order! stop loss below 2 boxes. Short for vice versa.
for me, it’s a waste of time the renko. But enjoy for your studies.. 😉
Any strategy with a low risk/reward ratio and/or without a proper money management will fail. I know people who are doing very well with Renko trading.
Nicolas,
Manual trading with renko or automatic strategy ? I’m curious to see anybody with profits on live account with an automatic strategy
Both. Why curious? Whatever the price representation, it all depends of the strategy 😉
Currently testing this Renko strategy out. Too early to say but so far it’s working well.
Peux tu partager le code de ta stratégie ?
Merci d’avance
Can you share the code of your strategy?
thank you in advance
Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Thank you 🙂
@Fab28 I’m using a custom trend indicator bought from one of the guys here on the forum so the code won’t work unless you have that indicator. If I can adapt the strategy with supertrend I can post it here but at the moment it’s relying on this indicator.
PaulParticipant
Master
still interresting even without the indicator but how does yor code do live?
That looks interesting. Can you say which custom indicator, am curious to take a look?
Thanks,
S
Hi @Paul and @samsampop
Sorry, I haven’t been very active recently. I revisited this code and it seems to have some potential. With minimal optimisation it still produces a good back test. It breaks all the rules, too many parameters, too little historic data etc. But I’m still interested in this kind of automatic scalping strategies. Any ideas would be welcome. The custom indicator (Perfect Trend Filter) is made by @aleale from his website.
defparam cumulateorders = false
// MM start
equity = 1000+STRATEGYPROFIT
risk=0.3
TF=15
if OpenDayofWeek = 0 then
//OkToTrade = 0
elsif OpenDayofWeek = 1 then // Monday
DailyRange=max(abs(Dhigh(2)-Dlow(2)),max(abs(Dhigh(2)-Dclose(3)),abs(Dlow(2)-Dclose(3))))
elsif OpenDayofWeek = 2 then // Tuesday
DailyRange=max(abs(Dhigh(1)-Dlow(1)),max(abs(Dhigh(1)-Dclose(3)),abs(Dlow(1)-Dclose(3))))
else
DailyRange=max(abs(Dhigh(1)-Dlow(1)),max(abs(Dhigh(1)-Dclose(2)),abs(Dlow(1)-Dclose(2))))
endif
DailyRange=max(abs(Dhigh(0)-Dlow(0)),DailyRange)
DailyATR=wilderaverage[20*TF](DailyRange)
a = (equity*risk)/(DailyATR)
t = a * 100
x = 0
// .25 decimal position sizes
incrementsize = 25
while x < t do
x = x + incrementsize
if x > t then
if x - t > incrementsize/2 then
x = x - incrementsize
endif
PositionSize = (x/100)
break
endif
wend
//once positionsize = 0.2
timeframe (1 minute)
//12:1 filter by Vonasi
Period = 12
Divider = 2
Filter = (close - open[Period - 1]) - (close - open[(Period / Divider) - 1])
if filter > 0 then
bull = 1
else
bull = 0
endif
if filter < 0 then
bear =1
else
bear = 0
endif
//12:1 filter end
timeframe (2 minutes)
trendfilter, ignored = CALL "$AT.IT Perfect Trend Filter"[4, 0]
if close > trendfilter then
trend = 1
else
trend = -1
endif
// ZEX indicator
timeframe (1 minute)
a1=SMI[20,6,5](close)
b1=triangularaverage[5](a1)
zex1=1.618*(a1-b1)
//
//timeframe (30 seconds)
//a2=SMI[12,6,5](close)
//b2=triangularaverage[5](a2)
//zex2=1.682*(a2-b2)
//
//timeframe (20 seconds)
//a3=SMI[12,6,5](close)
//b3=triangularaverage[5](a3)
//zex3=1.682*(a3-b3)
timeframe (Default)
//renko code
boxsize = 17 //17.1
volumesize=average[21](volume)*10
volumesum = volumesum+volume
once renkoMax = ROUND(close / boxSize) * boxSize
once renkoMin = renkoMax - boxSize
IF high > renkoMax + boxSize and volumesum-lastvolume>=volumesize THEN
WHILE high > renkoMax + boxSize
renkoMax = renkoMax + boxSize
renkoMin = renkoMin + boxSize
lastvolume = volumesum
WEND
ELSIF low < renkoMin - boxSize and volumesum-lastvolume>=volumesize THEN
WHILE low < renkoMin - boxSize
renkoMax = renkoMax - boxSize
renkoMin = renkoMin - boxSize
lastvolume = volumesum
WEND
ENDIF
// trend filter
if trend=1 and bull and zex1 > 0 then
buysignal = 1
else
buysignal = 0
endif
if trend=-1 and bear and zex1 < 0 then
sellsignal = 1
else
sellsignal = 0
endif
//entry conditions
if not onmarket and buysignal then
buy positionsize contract at renkoMax + boxSize stop
elsif not onmarket and sellsignal then
sellshort positionsize contract at renkoMin - boxSize stop
endif
fastrsi = rsi[2]
maxposition=positionsize*2
if countofposition<=maxposition then
if longonmarket and fastrsi crosses under 30 then
buy positionsize contract at market
endif
if shortonmarket and fastrsi crosses over 70 then
sellshort positionsize contract at market
endif
endif
// stop loss
MaxStopValue = round(equity*risk)
set stop ploss maxstopvalue
//// close long position when price reverses
//if longonmarket and trend=-1 and bear=1 then
//longexit2 = 1
//else
//longexit2 = 0
//endif
//
//// close short position when price reverses
//if shortonmarket and trend=1 and bull=1 then
//shortexit2 = 1
//else
//shortexit2 = 0
//endif
//
//
//if longonmarket and longexit2=1 then
//sell positionsize contract at market
//sellshort positionsize contract at market
//longexit2=0
//endif
//
//if shortonmarket and shortexit2=1 then
//exitshort positionsize contract at market
//buy positionsize contract at market
//shortexit2=0
//endif
//
//if longonmarket and sellsignal then
//sell at market
//buy positionsize contract at market
//endif
//
//if shortonmarket and buysignal then
//sellshort at market
//buy positionsize contract at market
//endif
//
timeframe (Default)
//trailing stop function
trailingstart = 13 //15.7 //trailing will start @trailinstart points profit
trailingstep = 2.9 //trailing step to move the "stoploss"
//reset the stoploss value
IF NOT ONMARKET THEN
newSL=0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
newSL = tradeprice(1)+trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
newSL = newSL+trailingstep*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
newSL = tradeprice(1)-trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
newSL = newSL-trailingstep*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
timeframe (20 seconds)
// reversal exit
once longexit =1
once shortexit=1
if longexit then
if longonmarket then
minrangedistL=1
cl1=close<open and close[1]<open[1] and close[2]<open[2]
cl2=(close=low or close[1]=low[1] or close[2]=low[2])
cl3=(range>(close/1000)*minrangedistL or range[1]>(close[1]/1000)*minrangedistL or range[1]>(close[1]/1000)*minrangedistL)
if cl1 and cl2 and cl3 then
sell at market
sellshort positionsize contract at market
endif
endif
endif
if shortexit then
if shortonmarket then
minrangedistS=1
cs1=close>open and close[1]>open[1] and close[2]>open[2]
cs2=(close=high or close[1]=high[1] or close[2]=high[2])
cs3=(range>(close/1000)*minrangedistS or range[1]>(close[1]/1000)*minrangedistS or range[1]>(close[1]/1000)*minrangedistS)
if cs1 and cs2 and cs3 then
exitshort at market
buy positionsize contract at market
endif
endif
endif
// Friday 22:00 Close ALL operations.
IF DayOfWeek = 5 AND time = 214500 THEN
SELL AT MARKET
EXITSHORT AT MARKET
ENDIF
set stop %loss 0.5
thanked this post
Might you share the .itf containing the Indicator please?
i think he mentioned that its been bought by ALE, GraHal
i applied another trendfilter with 70/30 WF and got almost identical results.
so i guess any trendfilter works, for better or worse 🙂