selling rate for automatic Trade

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

    Hello,

    I have a question. When a position has been executed and then sold again. How can I code the selling rate here so that I can continue working with the selling rate?

    Buy with 13500 in the Dax

    Sell by 134xx with “SET pTrailing” and i need the course for the next Trade.

    Sorry for my English. This ist not so good. I hope your understand me.

    Many thanks for your help.

    Best regards

    Fuchsi

    #156531 quote
    VonasiVonasi
    Moderator
    Master

    Fuchsilein – Welcome to the forums….. however please follow the few simple forum rules. Your topic is strategy related and not Screener related. I moved your topic to the correct forum.

    Post your topic in the correct forum:
    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

     

    I do not understand your question. Perhaps you would be better asking it in the German language forum if you think communicating in English might make things more difficult?

    #156753 quote
    FuchsileinFuchsilein
    Participant
    Junior

    Hello,

    Thank you for the move in the correct forum.

    Best Regards

    #156787 quote
    GraHalGraHal
    Participant
    Master

    You may be looking for TradePrice?

    TRADEPRICE

    #156971 quote
    FuchsileinFuchsilein
    Participant
    Junior

    Hello,

    no this in not mean.

    This is a exampel.

    //Dow Long - Short
    
    // Es werden keine Daten vor Start des Handelssystems geladen.
    // Im Fall eines ersten Starts dieses Handelssystems an einem Nachmittag, wird auf diese
    // Weise der nächste Tag abgewartet, um mögliche Kauf- und Verkauf-Order festzulegen.
    DEFPARAM PreLoadBars = 0
    
    // Die Position wird um 21 Uhr 58 (lokale Zeitzone) glattgestellt.
    DEFPARAM FlatAfter = 205800
    
    // Keine neue Position nach dem Candlestick, der um 21 Uhr 30 schließt.
    LimitEntryTime = 203000
    
    // Marktanalyse beginnt mit dem 1 Minuten-Candlestick, der um 9 Uhr 00 eröffnet.
    StartTime = 080000
    
    // Feiertage wie 24. und 31. Dezember werden ausgeschlossen.
    IF (Month=1 And Day=1) or (Month=5 AND Day=1) OR (Month=12 AND (Day=24 OR Day=25 OR Day=26)) THEN //Day=31 nur im Dax
    TradingDay=0
    ELSE
    TradingDay=1
    ENDIF
    
    //--------------------------------------------------
    
    // Die Variablen können je nach Wunsch individuell angepasst werden
    PositionSize = 1 //Positionsgröße
    AmpiltudeSize = 10 //Abstandsgröße vom Eröffnungskurs
    StopOne = 10 //Erster Abstand zum Stop
    StopTrailing = 50 //Erster Trainlingsabstand
    
    
    //--------------------------------------------------
    
    IF TIME=StartTime THEN
    StartKurs = Open
    ENDIF
    
    IndexStartDay = StartKurs
    
    
    //--------------------------------------------------
    
    
    
    // Diese Variable wird ein einziges Mal vor dem Start des Handelssystems initialisiert.
    ONCE StartTradingDay = -1
    
    // Die während des Tages sich verändernden Variablen werden
    // beim ersten Balken jeden neuen Börsentages initialisiert.
    IF (Time<=StartTime AND StartTradingDay<>0) OR IntradayBarIndex=0 THEN
    BuyPosition = 0
    SellPosition = 0
    StartTradingDay = 0
    ELSIF Time>=StartTime AND StartTradingDay=0 AND TradingDay=1 THEN
    
    // Der Index des ersten Balkens des Börsentages wird gespeichert. Eröffnungskurs
    
    StartTradingDay=1
    ELSIF StartTradingDay=1 AND Time<=LimitEntryTime THEN
    
    
    // Eröffnung Kaufen
    IF BuyPosition>=0 THEN
    IF LongOnMarket THEN
    BuyPosition = 1
    ELSE
    LimitEntryBuy = open[2] < (IndexStartDay+AmpiltudeSize) AND close > (IndexStartDay+AmpiltudeSize)
    LimitEntryBuy = close CROSSES OVER (IndexStartDay+AmpiltudeSize)
    
    IF LimitEntryBuy THEN
    BUY PositionSize CONTRACT AT MARKET
    SET STOP pLOSS StopOne
    SET STOP pTRAILING StopTrailing
    
    ENDIF
    ENDIF
    ENDIF
    
    
    // Eröffnung Verkaufen
    IF SellPosition>=0 THEN
    IF ShortOnMarket THEN
    SellPosition=1
    ELSE
    LimitEntryShort = open[2] < (IndexStartDay-AmpiltudeSize) AND close > (IndexStartDay-AmpiltudeSize)
    LimitEntryShort = close CROSSES UNDER (IndexStartDay-AmpiltudeSize)
    
    IF LimitEntryShort THEN
    SELLSHORT PositionSize CONTRACT AT MARKET
    SET STOP pLOSS StopOne
    SET STOP pTRAILING StopTrailing
    ENDIF
    ENDIF
    ENDIF
    ENDIF
    
    //--------------------------------------------------
    
    //TSL mit kleiner Gewinnschwelle
    Breakeven = 15 //Sicherung des Gewinnes ab diesem Zeitpunkt
    Pointstokeep = 5 //breakeven-profit (Vorsicht vor dem spread!)
    
    //Stop Order, um die Positionen zu verlassen
    IF close > (TRADEPRICE+breakeven) THEN
    SELL AT(TRADEPRICE+Pointstokeep) STOP
    ENDIF
    IF close < (TRADEPRICE-breakeven) THEN
    EXITSHORT AT (TRADEPRICE-Pointstokeep) STOP
    ENDIF
    

    Now when I sell the Buy or the short I need the actual course for the new started.

    Do you unterstand me?

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

selling rate for automatic Trade


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Fuchsilein @fuchsilein Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/05/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...