Only open 1 trade when the entry condition is met

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #149245 quote
    PaulchalPaulchal
    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
    NicolasNicolas
    Keymaster
    Legend

    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.
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

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 NicolasNicolas
5 years, 11 months ago.

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