donchian channel code funktioniert nicht

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #80375 quote
    rmhandel
    Participant
    Junior

    kann mir jemand bitte sagen warum dieser Code nicht funktioniert ?
    Vielen Dank

    
    
    
    
    
    
    //-------------------------------------------------------------------------
    // Hauptcode : donchian 20 kauf und exit
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Hauptcode : mein donchian 20 perioden
    //-------------------------------------------------------------------------
    defparam cumulateorders = false
     
     
     
    upperDonchian = highest[20](high)
     
    lowerDonchian  = lowest[20](low)
     
    
     
    closehigh = close < lowest[2](low)
    
    
     
    clong = upperDonchian > upperDonchian[1]
    
     
    If  clong then
    buy 1 contract at market
    endif
     
    
     
    sell at closehigh or lowerdonchian stop
    
    #80717 quote
    teddy58
    Participant
    Average

    Versuchs mal damit:

    //-------------------------------------------------------------------------
    // Hauptcode : donchian 20 kauf und exit
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Hauptcode : mein donchian 20 perioden
    //-------------------------------------------------------------------------
    defparam cumulateorders = false
     
     
     
    upperDonchian = highest[20](high)
     
    lowerDonchian  = lowest[20](low)
     
     
     
    closehigh = close < lowest[2](low)
     
     
     
    clong = upperDonchian > upperDonchian[1]
     
     
    If  clong then
    buy 1 contract at market
    endif
     
     
    if longonmarket and closehigh then
    sell at market
    endif
    
    if longonmarket and lowerdonchian then
    sell at market
    endif
    
    #80736 quote
    Nicolas
    Keymaster
    Master

    Ich denke, dass Ihre Schließungsbedingungen ein Problem darstellen.
    Sie testen “closehigh” und “lowdonchian” als wahr oder falsch, aber sie sind offensichtlich immer wahr, weil sie 0 überlegen sind (0 = falsch /> 1 = wahr).
    Möchten Sie diese 2 Preisstufen als Stop-Loss nutzen?

    #80751 quote
    rmhandel
    Participant
    Junior

    Danke für die Rückmeldungen !!

     

    ja das möchte ich als stop loss nutzen

    #80782 quote
    Nicolas
    Keymaster
    Master

    In diesem Code wird der untere Donchian-Wert als Stoploss festgelegt:

    //-------------------------------------------------------------------------
    // Hauptcode : donchian 20 kauf und exit
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Hauptcode : mein donchian 20 perioden
    //-------------------------------------------------------------------------
    defparam cumulateorders = false
     
    upperDonchian = highest[20](high)
    lowerDonchian  = lowest[20](low)
     
    
    closehigh = close < lowest[2](low)
     
    clong = upperDonchian > upperDonchian[1]
     
    
    If  clong then
     buy 1 contract at market
    endif
     
    if longonmarket and closehigh then
     sell at market
    endif
    
    if longonmarket  then
    sell at lowerdonchian stop
    endif
    
    
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

donchian channel code funktioniert nicht


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
rmhandel @rmhandel Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Nicolas
7 years, 5 months ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 09/13/2018
Status: Active
Attachments: No files
Logo Logo
Loading...