Donchian Scalping strategy, help needed!

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #38442 quote
    TheAccountant
    Participant
    Average

    “Help! I need somebody
    Help! Not just anybody
    Help! You know I need someone
    Heeeeeeeeeeeeeeeeeeeeeeeeeeeelp! ”  🙂

    Hello everyone !

    I work on a scalping strategy based on donchian channel. I was inspired by a video I saw on the youtube channel of Doctrading ( Im a fan 🙂  )

    It’s a scalping stratégie on DAX. Timeframe M1. Filtered with MACD zero lag. I added  SMA50, SMA20, RSI and ADX. TP 2 pts SL 15 pts. The Timesitting are to have the spread a 1 pts.

    Please take a look at pics, it’s hard for me to describe with my bad english 🙂 ( I know: a guy with an English name who speaks bad English….. 🙂  )

    The problem is that the few losses destroy the long series of wins. And therefore the strategy is not profitable.

    I tried to modify the sl and tp. with SL = 40 pts we have 92% wins…. but is not profitable…

    So I tried to integrate this code of management of the positionsize (thanks to Nicolas) so that the beginning of a series of wins compensate the future loss :

    initiallot = 1
     
    if buycondition then 
     if positionperf(1)>0 then 
      count=count+1
     else
      count=0
     endif
     if count=1 then 
      mylot = 5
     elsif count=2 then 
      mylot = 10
     elsif count=3 then 
      mylot = 15
     else 
      mylot = initiallot
     endif
     
     BUY mylot CONTRACTS AT MARKET 
    endif

    But I did not find a good solution… And I’m blocked now. 🙁

    I will appreciate any help or ideas you may have.

    Have a nice day !

    TheAccountant.

    PS : I took the codes of the donchian channel and the MACD zero lag on the website of Doctrading.

    // 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
    noEntryBeforeTime = 091500
    timeEnterBefore = time >= noEntryBeforeTime
    
    // 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
    noEntryAfterTime = 171500
    timeEnterAfter = time < noEntryAfterTime
    
    // 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
    ignored, ignored, indicator1, indicator2 = CALL "macd zero retard perso"
    c1 = (indicator1 > indicator2)
    indicator3 = Average[50](close)
    c2 = (close > indicator3)
    indicator4 = RSI[9](close)
    c3 = (indicator4 < 70)
    indicator5, ignored = CALL "canal donchian perso"
    c4 = (close CROSSES OVER indicator5)
    indicator6 = Average[200](close)
    c5 = (close > indicator6)
    indicator7 = ADX[14]
    c6 = (indicator7 >= 25)
    
    IF (c1 AND c2 AND c3 AND c4 AND c5 AND c6) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    ignored, ignored, indicator8, indicator9 = CALL "macd zero retard perso"
    c7 = (indicator8 < indicator9)
    indicator10 = Average[50](close)
    c8 = (close < indicator10)
    indicator11 = RSI[9](close)
    c9 = (indicator11 > 30)
    ignored, indicator12 = CALL "canal donchian perso"
    c10 = (close CROSSES UNDER indicator12)
    indicator13 = Average[200](close)
    c11 = (close < indicator13)
    indicator14 = ADX[14]
    c12 = (indicator14 >= 25)
    
    IF (c7 AND c8 AND c9 AND c10 AND c11 AND c12) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stops et objectifs
    SET STOP pLOSS 15
    SET TARGET pPROFIT 2
    
    Buy-donchian-scalping.png Buy-donchian-scalping.png Sell-Donchian-Scalping.png Sell-Donchian-Scalping.png canal-donchian-perso.itf Donchian-Scalping.itf
    #38485 quote
    noisette
    Participant
    Veteran

    Hi,
    Even if it’s not the scalping philosophy, did you try a trailing stop? Or a takeprofit sized with volatility.

    TheAccountant thanked this post
    #38492 quote
    GraHal
    Participant
    Master

    Hey noisette takeprofit sized with volatility sounds interesting and useful, please could you share code to do that or a link on this site?

    Thank You
    GraHal

    #38497 quote
    TheAccountant
    Participant
    Average

    Hi ! I try with trailing stop based on ATR trailling stop ( great for other strategy) but for this strategy results was not good…

    In fact in manual one of the filter that I use are the supports and resistances (points pivots on PRT) : Do not buy just below a resistance or do not just sell over a support ( support/resistance = im not sur in english 🙂  ) But I do not know how to code this.

    Otherwise, there is a way to make the stoploss dinamic to adapt the size according to the volatility …  I do not know ! 😉

    #38499 quote
    Eric
    Participant
    Master

    i doubt that you can be profitable with a 2 point tp on dax?

    or maybe you are looking for positive slippage.. (i did get slipped 6 point on a buy stop a day ago)

    #38503 quote
    noisette
    Participant
    Veteran

    Hi GraHal,

    I mean a percentage of Average True Range indicator or Donchian Canal (as this indicator is alreaready used in this strategy).

    Regards.

    GraHal thanked this post
    #38526 quote
    GraHal
    Participant
    Master

    @Eric I also got an 4 point positive slippage the other day, mine was on a sell stop,

    Most get stung on negative slippage so it balances somewhat that we report positive also 🙂

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

Donchian Scalping strategy, help needed!


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by GraHal
8 years, 8 months ago.

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