Grid orders with one combined stop loss and limit, can it be done?

Viewing 8 posts - 301 through 308 (of 308 total)
  • Author
    Posts
  • #65371 quote
    Nicolas
    Keymaster
    Master

    In the short version you are “SELLING” short position in the BBexit function, you’d better use EXITSHORT! 😉

    Is this version valuable?

    #65379 quote
    rejo007
    Participant
    Senior

    hello,

    on what timeframe and pair do you use it?

    thanks

    #65500 quote
    cfta
    Participant
    Senior

    Thanks Nicolas, that’s such a simple and obvious miss it completly passed me by.

    I say that this version is more valuable than the previous ones and is a fair improvement, however it still requires a certain amount of discretion from the trader to anticipate an upcoming move and start the system before it begins. I usually start the systems in the morning and let them run for 2-4 hours and then again in the afternoon and sometimes all day.

    Rejo, these two latest verisions are intended for 1 minute, I use it on any market with good movement, primarily DAX, DOW, Nikkei EUR & GBP paired with AUD & CAD. A good system should work with plenty of markets since the behavior of any given market tend to differ over time I believe it’s not useful to build a system for one single market.

    Attached is a corrected version of the short.

    manel and Nicolas thanked this post
    CFTA-Short-HA-BBW-1.itf
    #111923 quote
    volpiemanuele
    Participant
    Veteran

    I, I’m interested for a “grid system”. I don’t undertand the latest version that function in real marker. Can you share it? Thanks

    #111984 quote
    Nicolas
    Keymaster
    Master

    This topic is not about a grid system the way you mean it I think, it doesn’t average the loss but pyramid the winners in order to get the most of a quick move of the market.

    #135090 quote
    Philstrading
    Participant
    Senior

    Hi

    Well far too many replies for me to peruse them all, however my son looked at one of the amended codes for buy only.

    Seems unclear what time frame this is for exactly. anyway he said it works best on the 3 minutes on Dax so ~I took a peek.

    The code attached here would need amending for times and testing with the spread change times being ruled out as market closures etc can create a x10 value of the spread so backtesting a bit iffy for such a programme without this being factored in.

     

    Anyway, so I will take a look at this, but for the code I looked at which is buy only over about a week and a half it didnt seem too bad, except that it was running 24hrs and there was no factoring in of the spread issues. So I would need to factor that in first.

    What I’ve done here is looked at the losing trades noting they were during bearish runs, so just added an MTF clause to not buy if the 5 minutes MAs are bearish when trading the 3 minute chart. The program needs to run on the 1 minute chart to work with MTF. So it’s attached anyway, will probably see a much different picture if ruling out the spread change times, but before I do that I would need to check what times those are..

    Lines 33 to 39 of code are a very simple amendment to rule out a bearish picture trading bullish using 2 MAs, could prob mod them to improve it too.

    //BREAKOUT running on 1 minute timeframe for MTF//////////////////////
    K=highest[1](close)     //IC*0.25
     
    //EXPECTED DAILY RANGE (PERCANTAGE) = ENTRY/STOP////////////////////////
    DP=0.007
     
    //GRID STEP DISTANCE/ STOP////////////////////////////////////////////////
    IC=((CLOSE*DP)/4)
    GRIDSTEP=IC
     
    //-------------------------------------------------------------------------
     
    //graph close as "close"
    //GRAPH K AS "BREAKOUT"
    //GRAPH START AS "START"
    //GRAPH IC AS "AVERAGE RANGE"
    //GRAPH floatingprofit as "floating profit"
    //GRAPH BBfloatingprofit as "BB Floating Profit"
     
    //-------------------------------------------------------------------------
     
     
    ////////////////////////////////////////////////////////////////////////////////////////
    // Conditions to enter long positions
    ////////////////////////////////////////////////////////////////////////////////////////
     
    //TREND INDI////////////////////////////////////////////////////////////////////////
    TFC=1
    indicator1 = dema[18*TFC](ROC[13*TFC](ExponentialAverage[1*TFC]))
    indicator2 = dema[18*TFC](ROC[13*TFC](ExponentialAverage[1*TFC]))
    c1 = (indicator1 > indicator2[1])
    
    //bearishness rule out based on MAs
    timeframe (5 minutes, updateonclose)
    indicator7 = Average[10](close)[1]
    indicator8 = Average[20](close) [1]
    c3 = (indicator7 < indicator8)//bearish MAs
    
    timeframe (3 minutes, updateonclose)
     
    //SET STOP ORDER INDI////////////////////////////////////////////////////////////////////////
    TFC2=15
    indicator10 = dema[20*TFC2](ROC[25*TFC2](ExponentialAverage[1*TFC2]))
    indicator20 = dema[20*TFC2](ROC[25*TFC2](ExponentialAverage[1*TFC2]))
    c10 = (indicator10 > indicator20[1])
    //c20 = (indicator10[1] < indicator20[2])  AND C20
     
     
    IF c1 AND C10  AND NOT ONMARKET THEN
    START=K
    BUY 1 CONTRACT AT K STOP
    BUY 1 CONTRACT AT CLOSE+K+GRIDSTEP STOP
    BUY 2 CONTRACT AT CLOSE+K+(GRIDSTEP*2) STOP
    //BUY 4 CONTRACT AT START+(GRIDSTEP*3) STOP
    ENDIF
     
    IF c1 AND COUNTOFPOSITION=1 AND NOT C3 THEN
    BUY 1 CONTRACT AT START+GRIDSTEP STOP
    BUY 2 CONTRACT AT START+(GRIDSTEP*2) STOP
    //BUY 4 CONTRACT AT START+(GRIDSTEP*3) STOP
    ENDIF
     
    IF c1 AND COUNTOFPOSITION=2 AND NOT C3 THEN
    BUY 2 CONTRACT AT START+(GRIDSTEP*2) STOP
    //BUY 4 CONTRACT AT START+(GRIDSTEP*3) STOP
    ENDIF
     
    //IF c1 AND COUNTOFPOSITION=4 THEN
    //BUY 4 CONTRACT AT START+(GRIDSTEP*3) STOP
    //ENDIF
     
     
    ////////////////////////////////////////////////////////////////////////////////////////
    //  SAFETY STOPS MATTA
    ////////////////////////////////////////////////////////////////////////////////////////
     
    // Stops and targets
    if countofposition=1 then
    SELL AT START-GRIDSTEP STOP
    ENDIF
     
    if countofposition=2 then
    SELL AT START STOP
    ENDIF
    if countofposition=4 then
    SELL AT START+GRIDSTEP STOP
    ENDIF
     
    //if countofposition=8 then
    //SELL AT START+(GRIDSTEP*2) STOP
    //ENDIF
     
     
    floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize
     
     
    //actual trade gains
    MAfloatingprofit = average[20](floatingprofit) //[ONMARKET]
    BBfloatingprofit = MAfloatingprofit - std[20](MAfloatingprofit)*1.8//0.25
     
     
     
    FPP= (BBfloatingprofit)/((pointvalue*countofposition/pipsize))+positionprice
     
    if onmarket  then
    if FPP<CLOSE then
    SELL AT FPP STOP
    endif
    ENDIF
     
     
     
    //GRAPH FPP AS "floatingprofit stop FPP"
    //GRAPH floatingprofit AS "floatingprofit"
    //GRAPH CLOSE AS "Close"
    

     

     

    Hope it helps..

    Nicolas thanked this post
    dax-results.jpg dax-results.jpg
    #135209 quote
    Philstrading
    Participant
    Senior

    Well perhaps I’m flogging an old horse looking at the dates, and I’m not sure what I’m doing, but I get some lousy reults from these codes backtesting, the last one when on demo came back with  a problem dividing 0 and shut down, the reults on many here I get are not so good, however when I check against trend they are greatly improved. So here is the code by gforton for a bullish 5 minutes dax. I got soso results from this, so added the trend check against various HTFs (running 24/7) and this one has a 25mins trend check on it, strangley enough raising th espread helped it a bit as well, but I reverted it to normal, and a check of trend on the 5 mins chart as well using 3 averages on the 5 mins chart.  The backtesting results are greatly improved on my backtesting, to the point its possibly feasibl eto run it, don’t know if it will run on pro-order yet mind, the last one didnt, but putting in the trend check seems to improve all the ones (3 I think) I’ve tried here, and whilst I still would say this needs improving, its not too bad, I’ve tried it on a few items, but looking for it to run on dax.

    So did anyone get this to run particularly well?

    I think its got potential with a trend check and maybe some other comparative checks to rule out more of the losing trades, (so I wn’t be putting it up yet), which appear to be when the buy is at a high, so likely some code can rule it out.. well I have some in mind anyway, I can see its flogging an old horse, but I actually think its got potential with an small overhaul of further trend  filters… :-

    Here’s the modded ITF file if anyone interested.. I’ll probably look on weekend now, but def with some potential checking the trends bullish… MTF again, 5 mins and 25 mins trend, 20 mins checkoff as well not too bad, on Dax. France40 not too bad either… Revive the horse if it can do some work I say.. LOL

    CTFA-HA-SQ-Long-5m-trendcheck.itf
    #231973 quote
    OtherAttorney
    Participant
    New

    Hello Traders,

    I am new to PRT and recently came across this fantastic old post. I am grateful for the contributions made by @cfta, @Nicolas and others. In the discussions from 2016-2018, it was mentioned that the system utilizing “grid orders with automated entries” could be significantly improved if PRT could support multi time frame in the code. I understand that this feature is now available in recent versions of PRT. I am curious to know if this grid system and associated indicators have ever been updated with the MTF codes. @Nicolas, any insights on this? Many thanks.

Viewing 8 posts - 301 through 308 (of 308 total)
  • You must be logged in to reply to this topic.

Grid orders with one combined stop loss and limit, can it be done?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
cfta @cfta Participant
Summary

This topic contains 307 replies,
has 1 voice, and was last updated by OtherAttorney
1 year, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/14/2016
Status: Active
Attachments: 106 files
Logo Logo
Loading...