donchian channel code funktioniert nicht

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #80375 quote
    rmhandelrmhandel
    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
    teddy58teddy58
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    rmhandelrmhandel
    Participant
    Junior

    Danke für die Rückmeldungen !!

     

    ja das möchte ich als stop loss nutzen

    #80782 quote
    NicolasNicolas
    Keymaster
    Legend

    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.
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

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 NicolasNicolas
8 years ago.

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