Close trade after 5 bars

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17923 quote
    davidp13
    Participant
    Average

    Hi. I have a daily system I’m trying to build in PRT. One of the exits are to close a trade, no matter the current price action, after 5 bars, so 5 days after the trade opened if still open. I have looked at TradeIndex and BarIndex, but no luck. Please if anyone has solved this can you help? Thanks

    #17927 quote
    Wing
    Participant
    Veteran
    if barindex-tradeindex=>5 then
    sell at market
    exitshort at market
    endif

    Is this what you tried?

    Daniel_H thanked this post
    #17972 quote
    davidp13
    Participant
    Average

    Thanks mate you are my hero!!!

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

Close trade after 5 bars


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
davidp13 @davidp13 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by davidp13
9 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/07/2016
Status: Active
Attachments: No files
Logo Logo
Loading...