max trades per day counter reset with hour condition not working

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #156784 quote
    raphaelopilski
    Participant
    Senior

    Hi, how can I tell the system to make max 3 trades per day?

    this is not working, can anybody help me out?

    if hour = 0 then
    trade=0
    endif
    
    if trade =3 then
    pos=0
    endif
    
    
    IF c1 AND c2 AND countoflongshares <maxshares and timeEnterBefore AND timeEnterAfter THEN
    BUY pos CONTRACT AT MARKET
    trade=trade+1
    ENDIF
    #156786 quote
    robertogozzi
    Moderator
    Master

    Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums

    Thank you 🙂

    There you go:

    if IntraDayBarIndex = 0 then
       trade = 0
    endif
     
    IF c1 AND c2 AND trade < 3 AND countoflongshares <maxshares and timeEnterBefore AND timeEnterAfter THEN
       BUY pos CONTRACT AT MARKET
       trade=trade+1
    ENDIF
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

max trades per day counter reset with hour condition not working


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 1 month ago.

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