Machine Learning in ProOrder ProRealTime

Forums ProRealTime English forum ProOrder support Machine Learning in ProOrder ProRealTime

Viewing 15 posts - 121 through 135 (of 455 total)
  • #126014

    Anyone know why this bandedge isn’t going up in step increments on 5? (As coded in above ML3 system — pls see ValueZ settings). Or is this to do with how StratAveB3 works saving the best performance? Cheers.

    #126024

    @Bard … if you are referring to the most recent code you posted then you startingvalue3 and minvalue3 Rem’d out. Also where is maxvalue3 and reps3 etc?

    Below is a copy of your code from Line 284

     

     

    1 user thanked author for this post.
    #126026
    When I use the term HAlgo3 I am referring to the No 3 / 3rd Heuristics Algo within your ML3 System.

    What is your concern with cross referencing?

    HAlgo3 cannot use any commands from HAlgo2 and HAlgo2 cannot use any commands from HAlgo1 … else the ML would all get screwed up.

    Reading later on your last 2 posts …  you knew above, but are you certain it is not happening??

    PS

    What is this ‘coffee’ you keep referring to??

    #126081

    Thanks for the feedback @GraHal. I found it easier to paste all the settings into the very top of the system code, so Algo 3 (bandedge) can be found at line 49. Reps3 and Max3 are at lines 53 and 54 respectively.
    I had so many different versions going last night, — multiple versions and alterations to the ML2 and ML3 systems — that I was copy and pasting them into blank text edits to preserve different versions I was working on and then going back to after figuring out how to get the cycle limit working. I probably posted the a version where I hadn’t taken out the bottom line 284 Algo 3 settings.

    HAlgo3 cannot use any commands from HAlgo2 and HAlgo2 cannot use any commands from HAlgo1 … else the ML would all get screwed up. Reading later on your last 2 posts …  you knew above, but are you certain it is not happening??

    It’s very hard to know… but I expect Juanj is correct in that it’ll make it difficult for the system to know what is increasing its profit expectancy. But I just had to see what would happen and experiment with it….
    Below is the evolution with coffee, (I thought I’d test ML on something I never trade, have no bias towards or feeling about its volatility that would influence me in my settings prefernce).
    The base, non ML system is using long entry at -0.8 crossover / short at 0.8 cross under with a 100 bandedge, (setting that have worked well on other instruments). Pls see image and results.
    The next one up, ML 2 doesn’t use heuristic cycle limit, just algo 1 and 2 for the entry exits with a fixed bandedge of 100.
    System ML3 Old is my non heuristic cycle limit “see what would happen” 3 algos all added together.
    System ML3 New is with the heuristic cycle limit for algos 1 and 2. Algo 3 is still not being monitored by the heuristic cycle limit although the algo 3 is altering its bandedge judging by Graph ValueZ.
    Is that 3 x heuristic cycle limit initiation and the rest of the heuristic cycle limit code I posted above correct, I ask because when I try to use an “If HeuristicsAlgo3 = 1 Then” command at the beginning of Algo 3 (at the bottom of the code, that controls the oscillator bandedge), it doesn’t take any trades at all. Can anyone clear up the issue of the incorrect syntax (despite no PRT warning) because there is a float of code from the right margin (see previous post)? I suspect once that’s cleared up it’ll run fine. It would be good to get this triple ML system working using and amending the code I posted above! When that is done @bertrandpinoy I can itf the code. If you want to play around with the code above (ML3 New) here it is plus the Ehler’s Universal Oscillator indicator:
    Edit: I don’t see the itf’s despite attaching them to this post?

    1 user thanked author for this post.
    #126099

    float of code from the *right margin = left margin.

    I also just un-REM’ed: HeuristicsCycle = HeuristicsCycle + 1 for Algo 3, it also made no difference: Still no trades.

    1 user thanked author for this post.
    #126109

    System ML3 New is with the heuristic cycle limit for algos 1 and 2.

    Do you know if the heuristic cycle limit is working for HAlgo 1 and HAlgo 2?

    We could do with a counter in the code so we for definite?

    #126144

    I can only judge it from the graphs and I’d say yes and no. Pls see Graph X and Y image. It looks like the oscillator entry/exit is not working most of the time with cycle limit (whereas when not using cycle limit these thresholds do vary all the time throughout the backtest date range). The bandedge is of course working but that wasn’t being governed by the cycle limit… It seems to me that I have had more problems getting systems to work with the cycle limit code, for example I’m looking at the Pivot system I posted a few days ago and that works if the cycle limit is rem’d out/blocked.

    Maybe the counter code would be a good idea? I think the results are better without cycle limit, so far, what do you find when you test with and without the cycle limit? I preferred this code when it was sans cycle limit, far less troubleshooting, ha ha. I know, I know … avec cycle limit should be far superior.

    Also realised why my system keeps hanging: (2nd image), oops… 😃

     

    #126150

    I agree … I could not convince myself that the Cycle Limit worked.

    Same as you … performance / results seemed worse when I tried to include the Cycle Limit.

    JuanJ may have coded it quickly when I was pushing to use 2 HAlgos in the same System?  I don’t think the Cycle Limit is code JuanJ himself has used / tested / proved??

    #126275

    I wouldn’t know for sure about testing/being proven. I have seen a few better results with a 2 algo cycle limit late last night on Coffee. I’ll post more if it’s consistent. It should be with the logic of what cycle limit is doing, otherwise without cycle limit, how does the system know where the improvements are coming from? (Not that that stopped some pretty amazing performance when I used a system without the cycle limit and had 3 algos going – 2 for threshold (X and Y) and 1 for bandedge (Z)) as posted on this thread.

    If only the ML code could be “turned on itself” to self optimise that Reps number because Reps can make a big difference…

    We could do with a counter in the code so we for definite?

    Can you do that? It may help explain why the X and Y thresholds for the Oscillator being identical for most of the backtest but then slightly varying a little later on – as per screenshot above.

    #126279

    how does the system know where the improvements are coming from?

    As you know … it does not need to know for it to work as each HAlgo acts independent of each other, but 2 changes simultaneosuly may not be in the most beneficial direction for both (at same time)?

    I guess if HAlgo1 optimised an entry variable and HAlgo2 optimised an exit variable then HAlgo1 would not muddy the waters for HAlgo2?

    pretty amazing performance

    So do you have that System on Forward Test now then?

    #126295

    I guess if HAlgo1 optimised an entry variable and HAlgo2 optimised an exit variable then HAlgo1 would not muddy the waters for HAlgo2?

    But Algo2 can only be measured in the context of what Algo1 is doing? All systems are interdependent with their entries and exits, no? The systems only concern is to see if the last 3 days (reps) performance was better than the last stored performance (B), it doesn’t care where the performance comes from. If -0.6 entry and + 0.9 exit produce the most profit it will set out to beat that in the next 3 Reps.

    So do you have that System on Forward Test now then?

    Not live demo, no. I had this bizarre time consuming issue where the cycle limit system with 3 algos turned out to be identical to another slightly differently named system and yet the profits were £67k versus £31k! Put the code from the £67k into the £31k template and it made £67k, yet the code is identical, went through it line by line, side to side three times! Still have no idea, guess I’m keeping the £67k system…

    I’m still looking at theses Univ Osc systems, figuring out what’s best in terms of  using the cycle limit, whether 2 algos is better than 3. It’s tricky stuff, you think it’s complete then you realise it’s not optimal because you realise the “ElsIf HeuristicsAlgo2 = 1 Then” command have been rem’d out because you’d omitted it in earlier testing, seeing how the two or three Algos performed without cycle limit…. As per the code in this post: https://www.prorealcode.com/topic/machine-learning-in-proorder/page/8/#post-126009

    Lot to take it and test! And I feel this is only the start, imagine cycle limit and 4 or 5 algos because now you’re self optimising trade size and maybe a trailing stop as well as entry / exit thresholds and bandedge… Without cycle limit it’ll not be using the ML code to it’s full potential.

     

    #126300

    went through it line by line, side to side three times!

    You should use  this free website … a few seconds to copy and paste 2 versions of code, click ‘Find Difference’ and hey presto all the differences highlighted!

    No need to register, but if you do then you can even save the compared codes for later as equired.

    https://www.diffchecker.com/diff

     

    1 user thanked author for this post.
    #126320

    Hi @Nicolas, is it possible to take a look at this heuristic cycle limit initialisation code below? I’m using it at the very beginning of a system but it doesn’t take any trades.
    The code below adds an extra HeuristicsAlgo “#3” to the code of a system that does work found here: https://www.prorealcode.com/topic/machine-learning-in-proorder/page/3/#post-121130

    That page 3 system Juanj posted (#121130) only uses two algos: HeuristicsAlgo1 and HeuristicsAlgo2. I am attempting to get the machine learning/self optimising system to work with 3 algos using Ehler’s Universal Oscillator:
    ValueX for the entry threshold, ValueY for exit threshold, and ValueZ for the bandedge setting.

    When I’ve made systems using this machine learning code but without the heuristic cycle limit code, the results are very encouraging: https://www.prorealcode.com/topic/machine-learning-in-proorder/page/8/#post-126009

    Thanks for any input,
    Cheers Bard.

    #126323

    Found this, it’s free and does the job nicely: https://text-compare.com/

    More troublingly the codes still looked identical but with different profit results and it’s not the system template having different spreads or dates.. but thanks to your great idea @GraHal, I found the issue. I fixed the large lineage messy spacing (left code) between the two codes as highlighted in blue in image #2 below, so the codes then “looked” the same but they still produced £21k Ehler’s Univ Osc ML2+CycLim 2 (left hand code but now all tidied up) v’s £63k Univ Osc ML2+CycLim Juanj (right hand code).

    The problem: see:  “<—— this cursor didn’t seem be fully returned” that I’ve written within the pasted code below. It turned out to be some kind of single backspace return problem after I’d already “fixed” the differences in messy lineage gaps shown in image #2…  Please see lines 136 and 138 (left code) and those little single blue highlights. I spent all last night and today trying to compare and figure out why these “identical” codes either wouldn’t work or why the profit was different for ostensibly the same looking and reading code and yet here we are: A backspace of one single character. I have never ever had this issue before with PRT. Is this normal and maybe I should be sweeping all my code for errant cursor spacings?

    #126325

    When I’ve made systems using this machine learning code but without the heuristic cycle limit code, the results are very encouraging: https://www.prorealcode.com/topic/machine-learning-in-proorder/page/8/#post-126009

    The link above is a link to use of the Heuristic Cycle Limit … is this what you meant to libk to?

    If HeuristicsAlgo1 = 1 Then
    HeuristicsAlgo2 = 1
    HeuristicsAlgo1 = 0
    HeuristicsAlgo3 = 1

    Doesn’t above mean that HeuristicsAlgo2  and HeuristicsAlgo3 would work together at the same time??

    Your code below looks to me as though it should work for 3 HAlgos??

    https://www.prorealcode.com/topic/machine-learning-in-proorder/page/8/#post-126009

     

     

Viewing 15 posts - 121 through 135 (of 455 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login