Stop Loss after 4 days

Forums ProRealTime English forum ProOrder support Stop Loss after 4 days

Viewing 3 posts - 1 through 3 (of 3 total)
  • #12143

    hello,

    at the moment iam developing a new stategy and i need your coding support.

    i’m looking for the code snippet to define that my long position should sell after 4 days.
    i only can found thinks like sell after x pipes or soething like this, but i only need the command to sell my long position after 4 days

    greetings

    #12148

    If you are trading on a daily timeframe, you can test if the actual trade has 4 bars elapsed since its inception. You should look at TRADEINDEX in the documentation.

    #12175

    Hi Nicolas,

    thank you very much!

    IF LONGONMARKET AND (BarIndex – TradeIndex) >= 4 THEN
    SELL AT MARKET
    ENDIF

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login