BreakOut Kumo H4 – France40

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35156 quote
    cryoxdslcryoxdsl
    Participant
    Junior

    Hi everyone,

    This strategy is based on Kumo Breakout indicator.

    Timeframe : H4

    Spread used : 2

    Basicaly, once we get a +1 on indicator we buy 1 contract and then we sell it when we reach ou profit target.

    On short, we apply the same idea but on a reverse indication of the Kumo indicator.

    The main idea is to make some regular profit and to avoid huge drawdown.

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    // Annule tous les ordres en attente et ferme toutes les positions à 0:00, puis empêche toute création d'ordre avant l'heure "FLATBEFORE".
    DEFPARAM FLATBEFORE = 090000
    // Annule tous les ordres en attente et ferme toutes les positions à l'heure "FLATAFTER"
    DEFPARAM FLATAFTER = 173000
    
    // Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiés
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions pour ouvrir une position acheteuse
    indicator1 = CALL "Breakout Kumo"
    c1 = (indicator1 = 1)
    
    IF c1 AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour fermer une position acheteuse
    c2 = (close < close[1])
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    indicator2 = CALL "Breakout Kumo"
    c3 = (indicator2 = -1)
    
    IF c3 AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour fermer une position en vente à découvert
    c4 = (close > close[1])
    
    IF c4 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops et objectifs
    SET STOP pLOSS 35 pTRAILING 5
    
    graph-1494447469lp84c1.png graph-1494447469lp84c1.png Breakout-Kumo1.itf
    #35163 quote
    NicolasNicolas
    Keymaster
    Legend

    Thanks a lot for sharing your trading strategy code with us.
    I moved your post from library to forum to discuss about it. I think the results might be overestimated because of this line:

    SET STOP pLOSS 35 pTRAILING 5

    It is not possible to have 2 kind of stoploss in ProOrder (live trading), while it is possible in backtests. Did you test the strategy with tick/tick history?

    #35168 quote
    cryoxdslcryoxdsl
    Participant
    Junior

    Hi Nicolas,

    I have tested with tick/tick history on ibex35 successfully.

    For major indices or forex pairs, results are less interesting… at least using this timeframe&spread.

    As the indicator works not so bad, I assume that exiting on the next bar should be promising.

    Still to be tried.

    Thanks for your advise on Stops.

    #35183 quote
    NicolasNicolas
    Keymaster
    Legend

    About trailing stop you can try the code snippets you can find in these 2 blog posts:

    https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/

    https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/

    There are many forks of them in a lot of members strategies around here, you should browse the forums and the library too 🙂  Keep up the good work!

    #35244 quote
    cryoxdslcryoxdsl
    Participant
    Junior

    Hi everyone, Nicolas,

    Please find a draft code of a new version of the Breakout Kumo.

    Tested on a tick/tick history and 0.6 spread.

    EUR/USD Mini.

    Timeframe H4.

    PS : I will try to add the trailling stop code at another moment.

     

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    
    // Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position avant l'heure spécifiée
    timeEnterBefore = time >= 080000
    
    // Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position après l'heure spécifiée
    timeEnterAfter = time < 174500
    
    // Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiés
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    positionSize = 75
    // Conditions pour ouvrir une position acheteuse
    indicator1 = CALL "Breakout Kumo"
    c1 = (indicator1 = 1)
    
    IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry AND Time < 130000 AND c3[1] THEN
    BUY positionSize CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour fermer une position acheteuse
    c2 = (indicator1 = 0)
    
    IF c2 AND Time > 170000 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    indicator2 = CALL "Breakout Kumo"
    c3 = (indicator2 = -1)
    
    IF c3 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry AND Time < 130000 AND c2[1] THEN
    SELLSHORT positionSize CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour fermer une position en vente à découvert
    c4 = (indicator2 = 0)
    
    IF c4 AND Time > 170000 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    SET TARGET PPROFIT 65
    SET STOP PLOSS 20
    
    draftgraph.png draftgraph.png draftreport1.png draftreport1.png draftreport2.png draftreport2.png draftreport3.png draftreport3.png
    #35327 quote
    NicolasNicolas
    Keymaster
    Legend

    Bravo ça s’améliore 🙂

    Mais il doit y avoir une coquille quelque part, tu n’as aucun ordre d’achat dans le backtest alors que ton code en prévoit bien !

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

BreakOut Kumo H4 – France40


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
cryoxdsl @cryoxdsl Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by NicolasNicolas
9 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/11/2017
Status: Active
Attachments: 6 files
ProRealCode ProRealCode
Loading...