Exit after 2 bars after entry conditions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #171797 quote
    Paulchal
    Participant
    Average

    Hi

    I would like to write an exit strategy that after my entry conditions are met I exit after 2 candles. I cant put a flatafter time as I have between opening times. I am using 1TF.

    Any ideas?

    #171798 quote
    robertogozzi
    Moderator
    Master

    There you go:

    If OnMarket AND (BarIndex - TradeIndex) >= 2 Then
       Sell at Market
       Exitshort at Market
    Endif
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Exit after 2 bars after entry conditions


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paulchal @paulchal Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
4 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/15/2021
Status: Active
Attachments: No files
Logo Logo
Loading...