Single trade per day with stop orders

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

    Hello!

    All search results I’ve found only deal with how to limit your trades per day when using market orders. Currently, I’m using something like this:

    once EntriesToday = 0
    
    // Reset for each day
    if Date[1] <> Date[0] then
    EntriesToday = 0
    endif
    
    If OnMarket[0] <> 0 and OnMarket[1] = 0 then
    EntriesToday = EntriesToday + 1
    endif
    
    If not OnMarket and EntriesToday < 1 then
    Buy 1 contract at myLevel Stop // Stop order
    endif
    
    

    Here’s the problem. My systems always use stop orders to enter the market and sometimes a system is stopped out on the same bar it entered the trade, but EntriesToday can never be incremented with my current code. Thus it will attempt a second trade that I don’t want next bar again.

    I haven’t come up with a solution for this. Do any of you guys have suggestions to solve this? Or if there’s a setting for max executed orders per day in PRT I somehow missed

    Thanks

    #161303 quote
    robertogozzi
    Moderator
    Master

    To check if a trade has been both triggered and exited on the same bar you need to check STRATEGYPROFIT:

    If StrategyProfit <> StrategyProfit[1] then
       EntriesToday = EntriesToday + 1
    endif
    OscJoh thanked this post
    #161361 quote
    OscJoh
    Participant
    Average

    That worked, thanks a lot!

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

Single trade per day with stop orders


ProOrder support

New Reply
Author
author-avatar
OscJoh @oscjoh Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by OscJoh
4 years, 11 months ago.

Topic Details
Forum: ProOrder support
Language: English
Started: 02/13/2021
Status: Active
Attachments: No files
Logo Logo
Loading...