Machine Learning in ProOrder ProRealTime

Viewing 15 posts - 241 through 255 (of 455 total)
  • Author
    Posts
  • #127762 quote
    fifi743
    Participant
    Master

    Write as below

    IF high > renkoMax + boxSize THEN
    //WHILE high > renkoMax + boxSize
    renkoMax = renkoMax + boxSize
    renkoMin = renkoMin + boxSize
    //WEND
    ELSIF low < renkoMin - boxSize THEN
    //WHILE low < renkoMin - boxSize
    renkoMax = renkoMax - boxSize
    renkoMin = renkoMin - boxSize
    //WEND
    ENDIF
    GraHal thanked this post
    #127766 quote
    GraHal
    Participant
    Master

    Here we are @Bard … see above help from Fifi … it might solve some of your mysteries re change in results etc?

    Let us know if it helps?

    PS

    I even found a while back that a System was repeatedly getting rejected and when I replaced While and Wend the System worked fine!

    So I reckon we need to avoid / replace While and Wend whenever we see it in code??

    fifi743 thanked this post
    #127767 quote
    fifi743
    Participant
    Master

    First image with while and the second one without

    GraHal thanked this post
    Capture-d’écran-1114.png Capture-d’écran-1114.png Capture-d’écran-1115.png Capture-d’écran-1115.png
    #127776 quote
    Bard
    Participant
    Master

    Thanks for the code Vonasi, I must be doing something wrong because I cannot get the Nonetheless VRT turned off system, to match the system results that I have with no VRT code in it.
    Have I misread your VRT on/off instructions? :–
    This code below is in the Nonetheless version and gives a profit of £201k. My non VRT version gives a profit of £55k. Cheers.

    //DEFPARAM FLATAFTER = 210000
    
    RobustnessTest = 0
    
    StartDate = 0//20000101 
    //Qty = 10
    //Random = 3
    Qty = q    //(go to opt variables and set q b/w 2 and 10 )
    Random = r //(go to opt variables r b/w 1 and 10)
    
    once j = 0
    once flag = 1
    
    if flag = 1 then
    j = j + 1
    if j > qty then
    flag = -1
    j = j - 1
    endif
    endif
    
    if flag = -1 then
    j = j - 1
    if j = 0 then
    j = j + random
    flag = 1
    endif
    endif
    
    tradeon = 0
    if opendate >= startdate then
    if barindex mod qty = 0 or barindex mod qty = j then
    tradeon = 1
    endif
    endif
     
    if not RobustnessTest then
    tradeon = 1
    endif
    
    //Money Management
    #127777 quote
    nonetheless
    Participant
    Master

    Write as below

    Thanks Fifi – very helpful as always! – but this is now duplicating work already done at the beginning of the Pure Renko strategy thread. See #120416

    #127780 quote
    Bard
    Participant
    Master

    Afternoon @Fifi, and @GraHal, I got the While and Wend from a GraHal post on the first page of the Pure Renko Forum which was based on DocTrading’s version of Renko here: https://www.prorealcode.com/prorealtime-trading-strategies/pure-renko-strategy/

    I got far worse results when I took While/Wend out and used Paul’s simplified version: https://www.prorealcode.com/topic/discussion-re-pure-renko-strategy/#post-120416

    Pls see £/$ Monthly screens. (I still laugh at how I couldn’t get the 1 min Renko to make money so I thought they must mean 1 month because look at the great results)! Note: This is not tick by tick results. Please my next post on how much tick by tick data PRT supplies courtesy of Anton at IG Index.

    Could you please explain what the code with While/Wend does? I looked it up when I first came across it and found this example:

    Syntax
    While <expression>
      ...
    Wend
    
    Description
    Wend will loop until the <expression> becomes false. A good point to keep in mind with a While test is that if the first test is false, then the program will never enter the loop and will skip this part. 
    A Repeat loop is executed at least once, (as the test is performed after each loop). 
    
    With the Break command it is possible to exit the While : Wend loop during any iteration, with the Continue command the end of the current iteration may be skipped. 
    
    Example
      b = 0
      a = 10
      While a = 10 
        b = b+1 
        If b=10 
          a=11 
        EndIf 
      Wend
     
    This program loops until the 'a' value is <> (not equal to) 10. The value of 'a' becomes 11 when b=10, the program will loop 10 times. 
    
    https://www.purebasic.com/documentation/reference/while_wend.html
    
    So...
    
    once renkoMax = ROUND(close / boxSize) * boxSize
    once renkoMin = renkoMax - boxSize
    
    IF high > renkoMax + boxSize THEN
    WHILE high > renkoMax + boxSize
    renkoMax = renkoMax + boxSize
    renkoMin = renkoMin + boxSize
    WEND
    
    ELSIF low < renkoMin - boxSize THEN
    WHILE low < renkoMin - boxSize
    renkoMax = renkoMax - boxSize
    renkoMin = renkoMin - boxSize
    WEND
    ENDIF
    
    c1 = renkoMax + boxSize
    c2 = renkoMin - boxSize
    
    // Conditions to enter long positions
    If c1 then
    Buy N CONTRACT at renkoMax + boxSize stop
    EndIf
    
    // Conditions to enter short positions
    If c2 then
    Sellshort N CONTRACT at renkoMin - boxSize stop
    EndIf
    
    // Stops and targets
    //SET STOP PLOSS ValueX //75
    Set stop trailing ValueX//100
    SET TARGET PPROFIT 500 //Orig 150
    
    
    Discussion re Pure Renko strategy
    Renko-Wend-1M-£-Monthly-£87k-770-Win-53-Gainloss-2.5-DDown-13-01082009-01042020.png Renko-Wend-1M-£-Monthly-£87k-770-Win-53-Gainloss-2.5-DDown-13-01082009-01042020.png Renko-Without-Wend-1M-£-Monthly-£21k-113-Win-41-Gainloss-1.4-DDown-21-01082009-01042020-WITH-SPREAD.png Renko-Without-Wend-1M-£-Monthly-£21k-113-Win-41-Gainloss-1.4-DDown-21-01082009-01042020-WITH-SPREAD.png
    #127783 quote
    Bard
    Participant
    Master
    PRT Tick By Tick Data Lengths from an IG Index email this morning:

    “Below is a breakdown of the Historical data limits on Prorealtime:

    Tick data; (Tick by tick, 1 minute, 2 minute and 3 minute): 2 days.

    Intraday data: 5 minutes and up to but not including 60 minute time-frames: 1 month.

    Hourly views will have: 3 months.

    Daily view: as much data as possible.”

    GraHal thanked this post
    #127786 quote
    Vonasi
    Moderator
    Master
    Have I misread your VRT on/off instructions? :–
    The code you posted looks the same as mine. Have you tried starting from fresh – import the code from nonetheless’ post and add the robustness test switch code. This will eliminate any chance that you messed up the code somehow with all the // in and out.
    Bard thanked this post
    #127791 quote
    fifi743
    Participant
    Master
    PRT Tick By Tick Data
    I’ve back-tested this strategy tick by tick with no problem. I think and I stress your code has a problem.
    Bard thanked this post
    Capture-d’écran-1120.png Capture-d’écran-1120.png Capture-d’écran-1121.png Capture-d’écran-1121.png
    #127797 quote
    Bard
    Participant
    Master
    Typed in my IG Index password as “Renko.” I think I might need to take a break from Renko ML algos for a while… 😃
    GraHal thanked this post
    #127798 quote
    fifi743
    Participant
    Master
    // Conditions to enter long positions
    If c1 then
    Buy N CONTRACT at renkoMax + boxSize stop
    EndIf
    
    // Conditions to enter short positions
    If c2 then
    Sellshort N CONTRACT at renkoMin - boxSize stop
    EndIf
    This is what blocks us to have tick by tick 200 000 unité to be replaced by below
    // Conditions to enter long positions
    If c1 then
    Buy N CONTRACT at market
    EndIf
    
    // Conditions to enter short positions
    If c2 then
    Sellshort N CONTRACT at market
    EndIf
    Bard thanked this post
    #127804 quote
    nonetheless
    Participant
    Master
    Doesn’t work for me. Still getting the tbt error warning (tested on DJ daily) with or without While/Wend
    #127805 quote
    fifi743
    Participant
    Master
    The following works for me
    RENKO-M1ML11.itf
    #127810 quote
    GraHal
    Participant
    Master
    Backtested Fifi code above on 100,000 Daily bars … results attached. Goes back to 1971! No Tick by Tick warning etc. EDIT / PS Same on H4, H1, M15 … No Tick by Tick warning etc. On M5 … it blows my account .. but that is the values I used! 🙂
    fifi743 thanked this post
    Fifi.jpg Fifi.jpg
    #127812 quote
    GraHal
    Participant
    Master
    but that is the values I used!
    Maybe it’s not my values … do you get M1ML1 to make profit Fifi on the 1 min TF? If Yes can you post results please? EDIT / PS M1ML1 takes an insane number of trades with every box size from 5 to 150. Must not be working correctly??
    M1Ml11.jpg M1Ml11.jpg
Viewing 15 posts - 241 through 255 (of 455 total)
  • You must be logged in to reply to this topic.

Machine Learning in ProOrder ProRealTime


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
juanj @juanj Participant
Summary

This topic contains 454 replies,
has 32 voices, and was last updated by Khaled
4 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/06/2017
Status: Active
Attachments: 207 files
Logo Logo
Loading...