Discussion re Pure Renko strategy
Forums › ProRealTime English forum › ProOrder support › Discussion re Pure Renko strategy
- This topic has 345 replies, 24 voices, and was last updated 4 years ago by bertrandpinoy.
Tagged: renko
-
-
04/17/2020 at 3:44 PM #126579
The screenshot was from Demo Live £1 lot size, however since this morning I am now running it “Real Live” with £0.2 lot size. So far 2 winning trades which matches my demo live test.
I am also testing since this morning a daily optmisation but letting each strategy run for 1 week. So splitting the strategy into 5, mon-fri, and running daily optmisation the evening before the day it goes live. So Renko-Tuesday.itf will be optimised on Monday evening and reoptimised 7 days later. Tuesday evening I’ll optimise Renko-Wednesday.itf and so on. I’ll let you know how that goes..
Daily optimsation has shown better results with different box sizes but the fixed settings has proven to work better for me (so far)
I use box size 50 and renko type 1, run in 5 seconds (not 10s as mentioned above)
No changes to the original code (I think) but posting my verison here for reference.
04/17/2020 at 3:47 PM #12658204/17/2020 at 4:12 PM #126590Applied machine learning on 2.3pR version, and results are AWESOME.
I will try today to apply it on every version and on every timeframe in order to find the best one 🙂5 users thanked author for this post.
04/17/2020 at 4:14 PM #126592I’ll let you know how that goes..
Yes please … that will be well interesting an useful.
I got the S10 TF version going good now … backtest attached.
PS
Even better (2nd image) with the settings shown for Renko Type = 2 and Box size = 95.
1 user thanked author for this post.
04/17/2020 at 4:25 PM #126602First good version, 10sec.
Position size: 0.2
It only works between 8.00 to 21.00 in order to use just the lowest spreads available for DOW.
As you can see from the equity curve, the first day the system took a lot of trades in order to better optimize the machine learning algorithm values following my istructions; then, the system started to work normally with costant gains and trades.
So in a live trading optic, should be better to run it before 8am and not during the day, that could bring to losses.I confirm that ML could be the best thing to fit into these short TF systems.
04/17/2020 at 4:33 PM #126607In addiction, still thinking in a live trading optic, I’d run a new system every Sunday evening: “sacrifice” the Monday in order to let the system better optimize itself, and taking gains the rest of the week; closing it Friday evening and starting a new one on Sunday again.
1 user thanked author for this post.
04/17/2020 at 4:41 PM #12661104/17/2020 at 4:51 PM #126614First good version, 10sec.
Will you be sharing your first good version?
Is there no way to avoid the ‘first day sacrifice’!? Poor System! 🙂
Why not optimise the settings before you set it going?
Above is what I did when I got a few ML Systems working. We could even do a walk forward and use the settings for starting value etc from the latest IS period … least then the System kicks off with a fighting chance? Or even just use settings from a normal 10k bars optimisation?
Is above what you do or do you guess / finger in the air for starting value etc?
Just asking / just saying! 🙂
04/17/2020 at 4:58 PM #12661704/17/2020 at 5:48 PM #126632I just talked about some random ideas in order to stimulate brainstorming, sacrificing some systems 🙂
Heres the valuex (renko type) and valuey (boxsize) that i’ve used on the 2.3pr 10sec.
P.S.: Reset periods are just randoms
valuex123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105// Heuristics Algorithm StartIf onmarket[1] = 1 and onmarket = 0 Thenoptimize = optimize + 1EnDifStartingValue = 1ResetPeriod = 0.5 //Specify no of months after which to reset optimizationIncrement = 1MaxIncrement = 1 //Limit of no of increments either up or downReps = 6 //Number of trades to use for analysisMaxValue = 3 //Maximum allowed valueMinValue = increment //Minimum allowed valueonce monthinit = monthonce yearinit = yearIf (year = yearinit and month = (monthinit + ResetPeriod)) or (year = (yearinit + 1) and ((12 - monthinit) + month = ResetPeriod)) ThenValueX = StartingValueWinCountB = 0StratAvgB = 0BestA = 0BestB = 0monthinit = monthyearinit = yearEndIfonce ValueX = StartingValueonce PIncPos = 1 //Positive Increment Positiononce NIncPos = 1 //Neative Increment Positiononce Optimize = 0 ////Initialize Heuristicks Engine Counter (Must be Incremented at Position Start or Exit)once Mode = 1 //Switches between negative and positive increments//once WinCountB = 3 //Initialize Best Win Count//GRAPH WinCountB coloured (0,0,0) AS "WinCountB"//once StratAvgB = 4353 //Initialize Best Avg Strategy Profit//GRAPH StratAvgB coloured (0,0,0) AS "StratAvgB"If Optimize = Reps ThenWinCountA = 0 //Initialize current Win CountStratAvgA = 0 //Initialize current Avg Strategy ProfitFor i = 1 to Reps DoIf positionperf(i) > 0 ThenWinCountA = WinCountA + 1 //Increment Current WinCountEndIfStratAvgA = StratAvgA + (((PositionPerf(i)*countofposition[i]*100000)*-1)*-1)NextStratAvgA = StratAvgA/Reps //Calculate Current Avg Strategy Profit//Graph (PositionPerf(1)*countofposition[1]*100000)*-1 as "PosPerf1"//Graph (PositionPerf(2)*countofposition[2]*100000)*-1 as "PosPerf2"//Graph StratAvgA*-1 as "StratAvgA"//once BestA = 300//GRAPH BestA coloured (0,0,0) AS "BestA"If StratAvgA >= StratAvgB ThenStratAvgB = StratAvgA //Update Best Strategy ProfitBestA = ValueXEndIf//once BestB = 300//GRAPH BestB coloured (0,0,0) AS "BestB"If WinCountA >= WinCountB ThenWinCountB = WinCountA //Update Best Win CountBestB = ValueXEndIfIf WinCountA > WinCountB and StratAvgA > StratAvgB ThenMode = 0ElsIf WinCountA < WinCountB and StratAvgA < StratAvgB and Mode = 1 ThenValueX = ValueX - (Increment*NIncPos)NIncPos = NIncPos + 1Mode = 2ElsIf WinCountA >= WinCountB or StratAvgA >= StratAvgB and Mode = 1 ThenValueX = ValueX + (Increment*PIncPos)PIncPos = PIncPos + 1Mode = 1ElsIf WinCountA < WinCountB and StratAvgA < StratAvgB and Mode = 2 ThenValueX = ValueX + (Increment*PIncPos)PIncPos = PIncPos + 1Mode = 1ElsIf WinCountA >= WinCountB or StratAvgA >= StratAvgB and Mode = 2 ThenValueX = ValueX - (Increment*NIncPos)NIncPos = NIncPos + 1Mode = 2EndIfIf NIncPos > MaxIncrement or PIncPos > MaxIncrement ThenIf BestA = BestB ThenValueX = BestAElseIf reps >= 10 ThenWeightedScore = 10ElseWeightedScore = round((reps/100)*100)EndIfValueX = round(((BestA*(20-WeightedScore)) + (BestB*WeightedScore))/20) //Lower Reps = Less weight assigned to Win%EndIfNIncPos = 1PIncPos = 1ElsIf ValueX > MaxValue ThenValueX = MaxValueElsIf ValueX < MinValue ThenValueX = MinValueEndIFOptimize = 0EndIf// Heuristics Algorithm Endvaluey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105// Heuristics Algorithm 2 StartIf onmarket[1] = 1 and onmarket = 0 Thenoptimize2 = optimize2 + 1EndifStartingValue2 = 20ResetPeriod2 = 12 //Specify no of months after which to reset optimizationIncrement2 = 5MaxIncrement2 = 5 //Limit of no of increments either up or downReps2 = 1 //Number of trades to use for analysisMaxValue2 = 100 //Maximum allowed valueMinValue2 = increment //Minimum allowed valueonce monthinit2 = monthonce yearinit2 = yearIf (year = yearinit2 and month = (monthinit2 + ResetPeriod2)) or (year = (yearinit2 + 1) and ((12 - monthinit2) + month = ResetPeriod2)) ThenValueY = StartingValue2WinCountB2 = 0StratAvgB2 = 0BestA2 = 0BestB2 = 0monthinit2 = monthyearinit2 = yearEndIfonce ValueY = StartingValue2once PIncPos2 = 1 //Positive Increment Positiononce NIncPos2 = 1 //Neative Increment Positiononce Optimize2 = 0 ////Initialize Heuristicks Engine Counter (Must be Incremented at Position Start or Exit)once Mode2 = 1 //Switches between negative and positive increments//once WinCountB2 = 3 //Initialize Best Win Count//GRAPH WinCountB2 coloured (0,0,0) AS "WinCountB2"//once StratAvgB2 = 4353 //Initialize Best Avg Strategy Profit//GRAPH StratAvgB2 coloured (0,0,0) AS "StratAvgB2"If Optimize2 = Reps2 ThenWinCountA2 = 0 //Initialize current Win CountStratAvgA2 = 0 //Initialize current Avg Strategy ProfitFor i2 = 1 to Reps2 DoIf positionperf(i) > 0 ThenWinCountA2 = WinCountA2 + 1 //Increment Current WinCountEndIfStratAvgA2 = StratAvgA2 + (((PositionPerf(i)*countofposition[i]*100000)*-1)*-1)NextStratAvgA2 = StratAvgA2/Reps2 //Calculate Current Avg Strategy Profit//Graph (PositionPerf(1)*countofposition[1]*100000)*-1 as "PosPerf1-2"//Graph (PositionPerf(2)*countofposition[2]*100000)*-1 as "PosPerf2-2"//Graph StratAvgA2*-1 as "StratAvgA2"//once BestA2 = 300//GRAPH BestA2 coloured (0,0,0) AS "BestA2"If StratAvgA2 >= StratAvgB2 ThenStratAvgB2 = StratAvgA2 //Update Best Strategy ProfitBestA2 = ValueYEndIf//once BestB2 = 300//GRAPH BestB2 coloured (0,0,0) AS "BestB2"If WinCountA2 >= WinCountB2 ThenWinCountB2 = WinCountA2 //Update Best Win CountBestB2 = ValueYEndIfIf WinCountA2 > WinCountB2 and StratAvgA2 > StratAvgB2 ThenMode = 0ElsIf WinCountA2 < WinCountB2 and StratAvgA2 < StratAvgB2 and Mode2 = 1 ThenValueY = ValueY - (Increment2*NIncPos2)NIncPos2 = NIncPos2 + 1Mode2 = 2ElsIf WinCountA2 >= WinCountB2 or StratAvgA2 >= StratAvgB2 and Mode2 = 1 ThenValueY = ValueY + (Increment2*PIncPos2)PIncPos2 = PIncPos2 + 1Mode = 1ElsIf WinCountA2 < WinCountB2 and StratAvgA2 < StratAvgB2 and Mode2 = 2 ThenValueY = ValueY + (Increment2*PIncPos2)PIncPos2 = PIncPos2 + 1Mode2 = 1ElsIf WinCountA2 >= WinCountB2 or StratAvgA2 >= StratAvgB2 and Mode2 = 2 ThenValueY = ValueY - (Increment2*NIncPos2)NIncPos2 = NIncPos2 + 1Mode2 = 2EndIfIf NIncPos2 > MaxIncrement2 or PIncPos2 > MaxIncrement2 ThenIf BestA2 = BestB2 ThenValueY = BestAElseIf reps2 >= 10 ThenWeightedScore2 = 10ElseWeightedScore2 = round((reps2/100)*100)EndIfValueY = round(((BestA2*(20-WeightedScore2)) + (BestB2*WeightedScore2))/20) //Lower Reps = Less weight assigned to Win%EndIfNIncPos2 = 1PIncPos2 = 1ElsIf ValueY > MaxValue2 ThenValueY = MaxValue2ElsIf ValueY < MinValue2 ThenValueY = MinValue2EndIFOptimize2 = 0EndIf// Heuristics Algorithm 2 End1 user thanked author for this post.
04/17/2020 at 9:19 PM #126648Sorry for my newbie-question but how do i implement Francescos mashinelearning Valuex and ValueY in to the 2.3 version of the system?
So exciting following these threads with your genius codes, hope to someday be able to contribute with something as well. Wish you all a nice weekend!
04/17/2020 at 9:56 PM #126651I’m everything but not a genius coder 🙂
I’m still a newbie but reading everyday the forum since months and doing hundreds of tests on the platform i’m starting learing something. It becomes fun and fascinating especially when you are surrounded by the people of this section that works everyday for new challenges with strong motivations.Btw, if you want the answer to your question and start learning something, you can study this topic https://www.prorealcode.com/topic/machine-learning-in-proorder/ and you will easily understand in few pages how to implement the ML in the code.
04/17/2020 at 10:04 PM #12665204/17/2020 at 10:10 PM #12665504/17/2020 at 10:39 PM #126662Maxloss was set to 1 – does this part of the code act as a stop loss? I didn’t add a ‘set stop loss x’ code and wasn’t sure so I was watching the screen when the trades were on 🙂
It seems to be the entry is not perfect, but it’s probably very difficult to achieve that on this timeframe. However, it has a high win rate so it often ends up in profit as can be seen in my previous demo forward-test.
A tight stop loss will definatly see less wins. I don’t know how we can resolve this without adding too many parameters to the strategy. I was looking into oscillators on different timeframes, and voss predictive filter, but haven’t yet found anything that works well.
Any ideas?
-
AuthorPosts
Find exclusive trading pro-tools on