SHORT EUR USD (m15) // PAC MAN STRATEGY

Viewing 15 posts - 16 through 30 (of 86 total)
  • Author
    Posts
  • #69768 quote
    Balmora74
    Participant
    Veteran

    The condition :

    Cv3 = STD[10](close>= 10.93 * pipsize

    is made to avoid taking position in a small range = FALSE SIGNALS !!

    I have choise 10.93 after a walk forward backtest with 6 occurencies. You can try and tou will see that the results are good.

    Personnaly I prefer the original version of the code without Training Stop :

    12
    13
    14
    15
    16
    17
    18
    19
    20
    // PAC MAN STRATEGY – PIP HUNTER
    // SHORT EUR USD (M15)
    // SPREAD = 1 PIP
    DEFPARAM CumulateOrders = false
    DEFPARAM Preloadbars = 4000
    N = 7   //MINI LOT $1
    Cv1 = (close < Average[100]) and (Average[50] < Average[50](close[1]))
    Cv2 = RSI[14](close) <= 28
    Cv3 = STD[10](close) >= 10.93 * pipsize
    Cv4 = close <= BollingerDown[13](close[2])
    OKSHORT = cv1 and cv2 and Cv3 and Cv4
    IF OKSHORT then
    Sellshort n CONTRACT at market
    SET STOP pLOSS 52
    SET TARGET PPROFIT 25
    ENDIF

     

    But i think the code can be improve with less optimisation and more “price action”…

    Inertia thanked this post
    #70661 quote
    CN
    Participant
    Senior

    I enjoy the code Balmora. Running it live 🙂

    #70678 quote
    Balmora74
    Participant
    Veteran

    Thanks CN 😉

    #70752 quote
    JR1976
    Participant
    Veteran

    Hi Inertia , Balmora,

    I’am playng with your code  … I added : tprofit 11  +   Nicolas Trailing  and doesn’t work on Friday

    What do you think ?

    // PAC MAN STRATEGY - PIP HUNTER
    // SHORT EUR USD (M15)
    // SPREAD = 0.8 PIP
    //  Modifiche dall'originale :   TP 11 , +trailing stop
    
    DEFPARAM CumulateOrders = false
    //DEFPARAM Preloadbars = 4000
     
    N = 1   //MINI LOT $1
     
    Cv1 = (close < Average[100]) and (Average[50] < Average[50](close[1]))
    Cv2 = RSI[14](close) <= 28
    Cv3 = STD[10](close) >= 10.93 * pipsize
    Cv4 = close <= BollingerDown[13](close[2])
    OKSHORT = cv1 and cv2 and Cv3 and Cv4
    
    
    if currentdayofweek <> 5 then
    IF OKSHORT then
    Sellshort n CONTRACT at market
    SET STOP pLOSS 52
    SET TARGET PPROFIT 11
    //SET TARGET PPROFIT 25
    ENDIF
    endif
    
    
    //***************************************************************************************
    trailingstart = 5  // 5, 10, 21   trailing will start @trailinstart points profit
    trailingstep  = 1      //1     trailing step to move the "stoploss"
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
    ///   -----------------------------------------
    PACMAN-1.png PACMAN-1.png
    #70754 quote
    Balmora74
    Participant
    Veteran

    Hi JR1976. Seems very interesting. I’m not at home but tonight i will test it on 200.000 units 15

    #70755 quote
    Inertia
    Participant
    Master

    Thx JR1972.

    However ratio between Drawdown/Runup is >15% (high and risky IMHO)

    Not to compare stupidly but the one with the EMA filter shared ealier show a ratio <8% which makes it stronger over time (if I may).

    Perhaps, % instead of points could be more adaptative over time as well…

    #70841 quote
    Balmora74
    Participant
    Veteran

    You can try this new versus of the code with an exit instruction after 100 units in negative performance :

    // PAC MAN - PIP HUNTER
    // EUR / USD (M15)
    // By BALMORA74 19.05.2018
    
    DEFPARAM CumulateOrders = false
    DEFPARAM Preloadbars = 4000
    
    //VARIABLES
    ONCE BarShort = 100   //EXIT ZOMBIE TRADE
    N = 5                 // POSITION SIZE $1
    
    // STRATEGY
    Cv1 = (close < Average[100]) and (Average[50] < Average[50](close[1]))
    Cv2 = RSI[14](close) <= 28
    Cv3 = STD[10](close) >= 10.93 * pipsize
    Cv4 = close <= BollingerDown[13](close[2])
    OKSHORT = cv1 and cv2 and Cv3 and Cv4
    
    IF OKSHORT then
    Sellshort n CONTRACT at market
    SET STOP pLOSS 52
    SET TARGET PPROFIT 25
    ENDIF
    
    
    //EXIT ZOMBIE TRADE
    IF POSITIONPERF<0 THEN
    IF shortOnMarket AND BARINDEX-TRADEINDEX(1)>= barshort  THEN
    EXITSHORT AT MARKET
    ENDIF
    ENDIF
    
    

    Have a nice day !

    Capture-décran-2018-05-19-10.54.52.png Capture-décran-2018-05-19-10.54.52.png Capture-décran-2018-05-19-10.54.38.png Capture-décran-2018-05-19-10.54.38.png Capture-décran-2018-05-19-11.00.56.png Capture-décran-2018-05-19-11.00.56.png Capture-décran-2018-05-19-11.00.56-1.png Capture-décran-2018-05-19-11.00.56-1.png
    #70862 quote
    Balmora74
    Participant
    Veteran

    Hi JR1976,

    I show you the backtest of your code with a 200kb unit backtest.

    Position size = 5 mini lot ($1) and Starting Capital = 10.000 euros.

    Seems interesting….

    Capture-décran-2018-05-19-11.34.50.png Capture-décran-2018-05-19-11.34.50.png Capture-décran-2018-05-19-11.34.23.png Capture-décran-2018-05-19-11.34.23.png
    #70874 quote
    Vonasi
    Moderator
    Master

    I thought I’d check out the importance of some of the variables. The one that worried me the most upon first inspection was this one set at 10.93

    Cv3 = STD[10](close) >= 10.93 * pipsize

    So I graphed the results for other potential values:

    [attachment file=70875]

    [attachment file=70876]

    So it seems that 10.93 is a very optimized value. This is not to say that it will not work into the future (and you would not have lost any money either side of this optimized value but the further future markets move from this ideal value the rougher the equity curves are likely to get I suspect.

    A walk forward test with different values showed that earlier on a value around 15 would have been the best value to run with but since then around 9 or 10 would have been better.

    One to put on demo and watch I think…..

    Screenshot_8.png Screenshot_8.png Screenshot_9.png Screenshot_9.png
    #70878 quote
    Vonasi
    Moderator
    Master

    …and the analysis of RSI values:

    [attachment file=70879]

    [attachment file=70880]

    Screenshot_10.png Screenshot_10.png Screenshot_11.png Screenshot_11.png
    #70889 quote
    BC
    Participant
    Master

    Vonsai:

    Excellent analysis.

    #70894 quote
    Balmora74
    Participant
    Veteran

    Thanks Vonasi for your very strong analysis ! You can do it with PRT tools or is it personnals tools ?

    #70897 quote
    Vonasi
    Moderator
    Master

    Just Excel. Arrange the optimized results from low value to high value and then drag the window into Excel and create a chart. Worth doing for every strategy you create just to get an idea of results either side of your perfect value.

    IMHO I think that this strategy could be profitable. Whether everyone could stomach the equity curve when it is not as perfect as the perfect variable values makes everyone think the results should be is the bigger question. Going for three years with small losses and no profits is difficult to follow through with despite the fact that year four eventually makes up for all of it. A big starting bank balance and lots of other strategies and a strong psychology will only make up for this. No one strategy is a get rich quick in a straight line possibility unless you are lucky and luck cannot be quantified so should never be a part of a traders portfolio.

    Small starting balance = one strategy and trade and hope for luck.

    Big starting balance = lots of strategies diversified across markets and trade and make money with some big draw downs.

    Sorry – all a bit heavy but a lot of full time paper trading and analysing has led me to this conclusion.

    Still this one may work for a while and some may make some money and some may lose some money eventually!

    AlgoAlex thanked this post
    #70898 quote
    Balmora74
    Participant
    Veteran

    Vonasi thank you for the detailed and well explained answer

    Would you personally use this algorithm and if so with what value the conditions on the RSI and STD?

    #70900 quote
    Vonasi
    Moderator
    Master

    Would you personally use this algorithm and if so with what value the conditions on the RSI and STD?

    I would not put any strategy live until it has had at least several months successful forward testing on demo and after that only with minimum stake. money is difficult to make but very easy to lose. It is boring and a difficult thing to just sit on your hands and not have the excitement of real money on the table but if you look back on this forum and find strategies that were posted over a year ago and then backtest them now with the new out of sample period that you have it will be rare that you will find one that you would be happy to trade now. Unfortunately simplicity and ability to withstand massive draw down always seem to work.

    I like your strategy because it is simple, it has few variables and is profitable over a large range of variables even if the equity curve is not always positive. What I don’t like is the limited back test period available due to the short time frame chart.

    Looking at the graphs I made the values you chose are the optimum and either side is profitable so I would demo test with them and see how things go. I think the amount won per trade is very low and it will not take much for this to become a losing strategy due to this. A slightly off optimum variable value moving forward, a trade or two with increased spread and some slippage is all it needs to turn it to a losing strategy as nice as the equity curve is IMHO.

    Balmora74 thanked this post
Viewing 15 posts - 16 through 30 (of 86 total)
  • You must be logged in to reply to this topic.

SHORT EUR USD (m15) // PAC MAN STRATEGY


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Balmora74 @balmora74 Participant
Summary

This topic contains 85 replies,
has 16 voices, and was last updated by Vonasi
6 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/01/2018
Status: Active
Attachments: 59 files
Logo Logo
Loading...