Einstieg jeden Tag

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #260159 quote
    axmichi
    Participant
    Senior

    Hallo,


    ich hätte gern einen code der täglich in eine Aktie ab dem Datum 01.01.2012 einsteigt und genau nach 400 Tagen den Trade schließt, bei einem Feiertag einen Tag später.

    Das system soll 400 Tage vor dem heutigen Datum keine Trades mehr kaufen, sodass bei Testende alle Trade geschlossen sind.

    Als schlussdatum für neue Trades kann auch ein Datum stehen, der 01.02.2025 oder so

    Jeder einzele Trade muss nach 400 Tagen geschlossen werden. oder ist die Anzahl an zulässigen Trades dann zu hoch

    Der Chart ist auf Tagesbasis.


    Vielen Dank


    #260169 quote
    JS
    Participant
    Veteran

    Probier das mal…

    DefParam CumulateOrders=True
    
    
    If CountOfLongShares=0 then
    Buy 1 Share at Market
    StartBuy=BarIndex
    EndIf
    
    
    If CountOfLongShares<400 and (BarIndex-StartBuy)<400 then
    Buy 1 Share at Market
    EndIf
    
    
    If (BarIndex-StartBuy)>=400 then
    Sell 1 Share at Market
    EndIf 
    
    robertogozzi and Nicolas thanked this post
    Scherm­afbeelding-2026-04-13-om-17.07.23.png Scherm­afbeelding-2026-04-13-om-17.07.23.png
    #260204 quote
    axmichi
    Participant
    Senior

    Danke das passt ….

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

Einstieg jeden Tag


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
axmichi @axmichi Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by axmichi
1 day, 22 hours ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 04/13/2026
Status: Active
Attachments: 1 files
Logo Logo
Loading...