Machine Learning in ProOrder ProRealTime
Forums › ProRealTime English forum › ProOrder support › Machine Learning in ProOrder ProRealTime
- This topic has 454 replies, 32 voices, and was last updated 2 years ago by Khaled.
Tagged: machine learning
-
-
04/23/2020 at 3:20 PM #127630
Yes that would make sense, more likelihood of clashing orders in a 1 min TF compared to daily or 4 hr. When I decreased the boxsize from 100 to 50 I then got a tbt warning whereas before it hadn’t given me tbt warning during the 100 boxsize test?
04/23/2020 at 4:29 PM #127649@Vonasi, even just having”dead” optimisation variables for qty and Random left in a system, despite no actual VRT code in the system, makes a difference to the results.
I just compared the same system today with a screenshot of profit results from a few days ago. The system today has no VRT code as I stripped it out, but it still contained “dead” optimisation settings (Q: 2 to 10and R: 1 to 10) at the top.
I could not replicate the results today with those from a few days ago? I had to delete the Q and R settings from the optimisation variables window first before the results then matched with those of a few days ago? Any ideas!?04/23/2020 at 5:02 PM #127658The question though, is why is the VRT code giving different results compared to a non VRT system with the same code?
Not sure what you mean and I can’t get anything useful from your screenshot because I don’t have a magnifying glass powerful enough.
Do you mean that you have a strategy with the VRT code in it but turned off and an identical strategy but with no VRT code in it at all and they return different results? If so then the only answer can be because the strategy part of the code is not identical or the variable settings are not identical or they are being tested on different data samples.
04/23/2020 at 5:08 PM #127661I had to delete the Q and R settings from the optimisation variables window first before the results then matched with those of a few days ago? Any ideas!?
I don’t recall the variables being called Q and R in the robustness tester – they were Qty and Random – or are you abbreviating? If not then perhaps there are variables in the strategy code called Q and R – as I say I’ve not looked at the code.
04/23/2020 at 5:34 PM #127664I don’t recall the variables being called Q and R
I changed them to q and r cuz i’m lazy. Bard has my version of the VRT
04/23/2020 at 6:07 PM #127667Not sure what you mean and I can’t get anything useful from your screenshot because I don’t have a magnifying glass powerful enough.
The screen relates to tradeon=1 and it not working to turn off the VRT. The screenshot was taken on a 50″ LG tv. This is it zoomed in: Pls see image.
Do you mean that you have a strategy with the VRT code in it but turned off.
Yes, all rem’d out and tradeon taken out of “If buy and sell statements.” The only part of the VRT I left in was the variables in the very top of the system creation window and it made a big +ve difference to the profits. (Yes they’re abbreviations for qty and random). I can also test a non VRT system against a complete (and non rem’d) VRT coded system and the results are very different compared to the non VRT version but I’m guessing that’s not meant to happen? Pls see screen with VRT version makes £211k – top equity curve whilst Bottom equity curve and not a VRT system makes £55k:
Code otherwise identical thanks to text-compare.com
When you said:
“Click on the avg gain per trade tab in the optimiser window to organise the results in low to high and also drag the results into Excel.“
Did you mean that the smallest numbers at the bottom and largest at the top, only reading the Robustness thread I saw GraHal had a google spreadsheet with the smallest values at the top and the largest at the bottom which threw me? I’m really looking forward to getting Excel to behave and using this great piece of kit! Cheers.
04/23/2020 at 7:17 PM #127680Did you mean that the smallest numbers at the bottom and largest at the top
No – smallest at the top. Excel draws graphs using values from the top of the data to the bottom. You will notice that all the graphs slope up from left to right so that is low to high.
1 user thanked author for this post.
04/23/2020 at 7:32 PM #127683I just downloaded and imported Nonetheless’s last posted ITF and added the code I posted earlier to allow me to turn the VRT on or off and it worked just fine. With VRT off all the results were identical and with it on they were all different. I then // out all the VRT code and just left tradeon = 1 in the code and it returned one result that was identical to with the VRT code in the strategy but turned off.
04/24/2020 at 8:32 AM #127711This works well for modifying the period and type of an MA. I included an on/off so can be isolated.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221ONCE EnableHeuristics = 1If EnableHeuristics = 1 then // Start of Heuristics Algorithm 1If onmarket[1] = 1 and onmarket = 0 Thenoptimize = optimize + 1EnDifStartingValue = 45ResetPeriod = 10 //Specify no of months after which to reset optimizationIncrement = 5MaxIncrement = 10 //Limit of no of increments either up or downReps = 20 //Number of trades to use for analysisMaxValue = 75 //Maximum allowed valueMinValue = 25 //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// End of Heuristics Algorithm 1 ; Start of Heuristics Algorithm 2If onmarket[1] = 1 and onmarket = 0 Thenoptimize2 = optimize2 + 1EnDifStartingValue2 = 3ResetPeriod2 = 10 //Specify no of months after which to reset optimizationIncrement2 = 1MaxIncrement2 = 8 //Limit of no of increments either up or downReps2 = 20 //Number of trades to use for analysisMaxValue2 = 8 //Maximum allowed valueMinValue2 = 0 //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 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 Optimize2 = Reps2 ThenWinCountA2 = 0 //Initialize current Win CountStratAvgA2 = 0 //Initialize current Avg Strategy ProfitFor i = 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"//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 StratAvgA2 >= StratAvgB2 ThenStratAvgB2 = StratAvgA2 //Update Best Strategy ProfitBestA2 = ValueYEndIf//once BestB = 300//GRAPH BestB coloured (0,0,0) AS "BestB"If WinCountA2 >= WinCountB2 ThenWinCountB2 = WinCountA2 //Update Best Win CountBestB2 = ValueYEndIfIf WinCountA2 > WinCountB2 and StratAvgA2 > StratAvgB2 ThenMode2 = 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 + 1Mode2 = 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 = BestA2ElseIf 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 = 0EndIfgraph valuex coloured(0,255,0,255) as "period"graph valuey coloured(255,0,0,255) as "type"// Heuristics Algorithm 2 EndendifIf EnableHeuristics = 0 thenValueX = 45ValueY = 3endifma = average[ValueX,ValueY](close)cnd1 = ma > ma[1]cnd2 = ma < ma[1]1 user thanked author for this post.
04/24/2020 at 10:12 AM #127742Good morning,
I find that the while loop is a duplicate with the if condition.
You tried without the loop while1234567891011IF high > renkoMax + boxSize THENWHILE high > renkoMax + boxSizerenkoMax = renkoMax + boxSizerenkoMin = renkoMin + boxSizeWENDELSIF low < renkoMin - boxSize THENWHILE low < renkoMin - boxSizerenkoMax = renkoMax - boxSizerenkoMin = renkoMin - boxSizeWENDENDIF04/24/2020 at 10:30 AM #127748My browser e-find tells me there is 6 instances of ‘while’ on this page, but I can’t find two of them??
Nonetheless posted code has no ‘while’ in the code?
So I’ll have to ask … Fifi, who are you speaking to and which System are you referring to please?
04/24/2020 at 10:35 AM #12774904/24/2020 at 10:45 AM #127751The code set out on page 13
It’s always best if we Quote a small / most relevant part of the post we are referring to (as I have above) else folks will assume (as I did) that we are referring to the post immediately above our post.
1 user thanked author for this post.
04/24/2020 at 10:53 AM #12775404/24/2020 at 11:00 AM #127760So below is Bard’s code (from page 13 Line 145 to Line 155) which is the same as you show in your post?
So what should Bard have done with the code?
1234567891011IF high > renkoMax + boxSize THENWHILE high > renkoMax + boxSizerenkoMax = renkoMax + boxSizerenkoMin = renkoMin + boxSizeWENDELSIF low < renkoMin - boxSize THENWHILE low < renkoMin - boxSizerenkoMax = renkoMax - boxSizerenkoMin = renkoMin - boxSizeWENDENDIF -
AuthorPosts
Find exclusive trading pro-tools on