Only open 1 trade when the entry condition is met

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

    For a set entry condition how do I write I only want it to open 1 trade.

    Rather than repeated opening of positions when the entry condition is met in a set time period?

    #149248 quote
    Nicolas
    Keymaster
    Master

    You can count the BARINDEX between the last order and the current one, example on how-to wait for 10 bars between orders:

    if barindex-tradeindex >=10 and myCondition then 
     buy 1 contract at market 
    endif
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Only open 1 trade when the entry condition is met


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Paulchal @paulchal Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
5 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/02/2020
Status: Active
Attachments: No files
Logo Logo
Loading...