Discussion re Pure Renko strategy

Viewing 15 posts - 61 through 75 (of 346 total)
  • Author
    Posts
  • #121991 quote
    Francesco
    Participant
    Veteran

    No one is working trying to convert the strategy on higher timeframes? Maybe we can share ideas i would like to support it, it seems very interesting but i think will never put on live a strategy with 1 sec

    #122005 quote
    Paul
    Participant
    Master

    maybe what can be tested is trading the equity curve

    if performance falls, stop live trading, but keep counting fake trade results.

    If the fake results pick up, start trading live again.

     

    @Francesco second timeframe appears to be excellent to iron out the shortcomings and fix those. Later on I go back to a slower timeframe.

    Today anyway was a great day, but I’am not so sure if the results hold, when trading a much smaller range.

    Francesco thanked this post
    #122006 quote
    GraHal
    Participant
    Master

    f performance falls, stop live trading, but keep counting fake trade results. If the fake results pick up, start trading live again.

    Good idea as I have a few times today thought … I’ll put this live on Lot size 0.2 as it is doing so well then it goes through a losing phase! 🙂  But still in profit overall!

    If it wasn’t for the “broker does not know the status of your last order” System Stop then I would have 5 or 6 versions running at the same time and pick the best!

    #122154 quote
    Paul
    Participant
    Master

    Found a code from Nicolas and adopted it slightly to fit this strategy. It slows it down on 200k bars though.

    i.e. Can be used to trade only in the trend

    //moving average
    once usema=1
    if usema then
    once priceMAperiod=14
    count=0
    sum=0
    lastbox=0
    for i = 0 to barindex do
    if renkomax[i]<>lastbox then
    lastbox=renkomax[i]
    count=count+1
    median=((renkomax[i]+renkomin[i])/2)
    sum=sum+median
    if count=priceMAperiod+1 then
    sum=sum-last
    last=median
    break
    //
    endif
    endif
    next
    once avg=undefined
    if last<>last[1] then
    avg = sum/priceMAperiod
    endif
    graphonprice avg as "average renko"
    endif

    there was always something off with the “dynamic box”. Removed the +/- 1.

    boxsize=25 // 5 to 35
    boxdiff=0  // -5 to 5
    
    if dynamicbox then
    if close>close[1] and close[1]>close[2] then
    boxsize=boxsize+boxdiff
    elsif close<close[1] and close[1]<close[2] then
    boxsize=boxsize-boxdiff
    endif
    endif
    
    GraHal and Bard thanked this post
    Screenshot-2020-03-14-at-23.44.20.jpg Screenshot-2020-03-14-at-23.44.20.jpg
    #122169 quote
    Paul
    Participant
    Master

    it’s based on code what’s already used to determine performance.

    Takes the last completed trade result from a long (green) or short (red) and plot’s it as 1 for a win and -1 for a loss.

    Not sure yet if it could be usefull.

    if (longperf>longperf[2]) then
    previouslong=1
    elsif (longperf<longperf[2]) then
    previouslong=-1
    else
    previouslong=0
    endif
    if (shortperf>shortperf[2]) then
    previousshort=1
    elsif (shortperf<shortperf[2]) then
    previousshort=-1
    else
    previousshort=0
    endif
    
    graph previouslong coloured(0,200,0) as  "long result  (1=win;-1=loss)"
    graph previousshort coloured(200,0,0) as "short result (1=win;-1=loss)"
    Screenshot-2020-03-15-at-13.58.36.jpg Screenshot-2020-03-15-at-13.58.36.jpg
    #122181 quote
    GraHal
    Participant
    Master

    Not sure yet if it could be usefull.

    If anybody can … you can Paul!

    I’m sold on these 1 second Systems …. loved it last week, so interesting due to loads trades!

    And with the DJi up and down by 1oo points and more in 1 min the 1 Sec TF could be the way to go!?

    Btw I found Hour > 3 and Hour < 23 giving consistent good results re times to trade.

    Paul and nonetheless thanked this post
    #122258 quote
    Paul
    Participant
    Master

    If it wasn’t for the “broker does not know the status of your last order” System Stop then I would have 5 or 6 versions running at the same time and pick the best!

    When trying different positionsizes.  like 1 contract, 1,01 etc  I’am testing currently. Doesn’t seem to work though?

    Interesting is the south african 40 to test too, in the timezone with the lowest spread.

    Still backtest difference from the forward demo test, even with the fixes I tried.

    GraHal thanked this post
    #122267 quote
    Paul
    Participant
    Master

    same strategy in forward demo test

    one 0.27 positionsize, other 0.28. Rest is the same.

    Screenshot-2020-03-16-at-16.34.34.jpg Screenshot-2020-03-16-at-16.34.34.jpg
    #122274 quote
    fifi743
    Participant
    Master

    Hi .
    I don’t understand this
    It is not a comparison.

    myindex + nbbarlimit

    if rule1 and myindex + nbbarlimit and mylimitshort > 0  and not shortonmarket then
    sellshort positionsize contract at market
    endif
    #122279 quote
    Paul
    Participant
    Master

    Good evening Fifi,

    The code comes from the prorealtime manual on page 11.

    You can set the validity length of limit and stop orders.

    The following example shows how it is possible to create a limit order with a validity set to a specific number of bars by using variables. The code places a buy limit order at the close price of the bar on which a moving- average crossover occurred. This limit is valid for 10 bars after the bar of the crossing. If it is not executed during these 10 bars, it is cancelled.

    // Definition of the validity length of the order
    ONCE NbBarLimit = 10
    MM20 = Average[20](close) MM50 = Average[50](close)
    // If MM20 crosses over MM50, we define 2 variables "MyLimitBuy" and "MyIndex" containing the close price at that time and the index of the bar of the cross.
    IF MM20 CROSSES OVER MM50 THEN MyLimitBuy = close
    MyIndex = Barindex
    ENDIF
    IF BarIndex >= MyIndex + NbBarLimit THEN MyLimitBuy = 0
    ENDIF
    // Place an order at the price MyLimitBuy valid as long as this variable is greater than 0 and we are not in a long position.
    // Remember: MyLimitBuy is greater than 0 for the 10 bars after the bar of the crossing.
    IF MyLimitBuy > 0 AND NOT LongOnMarket THEN
       BUY 1 SHARES AT MyLimitBuy LIMIT
    ENDIF
    

    In case the order was not executed, it is possible to replace the expired buy limit order with a buy at market price order. This could be done by adding the following code to the previous one:

    IF MyIndex + NbBarLimit AND MyLimitBuy > 0 AND NOT LongOnMarket THEN
       BUY 1 SHARES AT MARKET
    ENDIF

     

    GraHal thanked this post
    #122281 quote
    fifi743
    Participant
    Master

    I do not know where you are in the updates.
    here’s mine

    GraHal, Paul and Francesco thanked this post
    Capture-d’écran-776.png Capture-d’écran-776.png renko-v2p-dji-1sec_mod-fifi.itf
    #122284 quote
    GraHal
    Participant
    Master

    Link to Paul’s post above added as Log 200 here …

    Snippet Link Library

    fifi743 thanked this post
    #122290 quote
    fifi743
    Participant
    Master

    Right above the trailling stop, I put this code.

    if longonmarket and barindex<=myindex + nbbarlimit and strategyprofit>strategyprofit+(close-positionprice)*round(COUNTOFLONGSHARES/positionsize) then
    trailingstoptype=0
    else
    trailingstoptype=1
    endif
    if shortonmarket and barindex>=myindex + nbbarlimit and strategyprofit>strategyprofit+(positionprice-close)*round(COUNTOFSHORTSHARES/positionsize) then
    trailingstoptype=0
    else
    trailingstoptype=1
    endif
    Capture-d’écran-780.png Capture-d’écran-780.png
    #122293 quote
    Paul
    Participant
    Master

    Thanks I will included it! Working on last part.

    I’ve 2 different versions, one with the code in the manual above, other normal approach.

    If using nnbarlimit=1 then both systems have the same result, as it should be.

     

    Also 3 ways to calculate the boxes. pfff and an attempted fix to run correctly.

    fifi743, Francesco and GraHal thanked this post
    #122295 quote
    Paul
    Participant
    Master

    Renkoboxes default uses close, I experimented with totalprice & Heiken Ashi.

    Removed dynamic box. It added nothing good enough.

     

    results are with spread 2.4 between 8am and 22pm.

    Original renko based on “close” with boxsize_25, 6k

    renko based on “Heiken Ashi” with boxsize__ 20, 10k

    more important I still see differences between live & active orders from the backtest. Maybe because I’am running different versions. Tomorrow I will stick to one.

    fifi743, GraHal, Francesco and nonetheless thanked this post
    Screenshot-2020-03-16-at-21.46.09.jpg Screenshot-2020-03-16-at-21.46.09.jpg Screenshot-2020-03-16-at-21.46.20.jpg Screenshot-2020-03-16-at-21.46.20.jpg renko-v2.3pR-dji-1sec_mod-fifi.itf
Viewing 15 posts - 61 through 75 (of 346 total)
  • You must be logged in to reply to this topic.

Discussion re Pure Renko strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 345 replies,
has 24 voices, and was last updated by bertrandpinoy
5 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/25/2020
Status: Active
Attachments: 149 files
Logo Logo
Loading...