Stop Loss nach 4 Tagen

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12141 quote
    michi2410
    Participant
    New

    Hallo zusammen,

    ich bin etwas am verzweifeln, da ich gerade eine Strategie entwickle, die ich gerne backtesten würde, mir aber der Programmiercode für meine Bedingung zum Ausstieg von Long-Positionen fehlt.

    Ich finde keine Möglichkeit wie ich definieren kann, dass meine Position nach genau 4 Tagen einfach verkauft werden soll. Kann mir jemand den Code hierzu schreiben?

    Viele Grüße

    #12151 quote
    Wing
    Participant
    Veteran
    If BuyConditions then
    buy 1 contract at market
    BuyDay=Days
    endif
    
    if Days>BuyDay+3 then
    sell at market
    endif
    
    
    
    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Stop Loss nach 4 Tagen


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
michi2410 @michi2410 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Wing
9 years, 5 months ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 08/23/2016
Status: Active
Attachments: No files
Logo Logo
Loading...