Different instructions for an intraday trading system

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #216963 quote
    brian gilbert
    Participant
    Junior

    Hi, I have a problem concerning the programming of an automatic trading system (I specify that I am a beginner …), namely: if I want the first operation of the day to have different conditions from the rules that I will then apply in the rest of the trading day, which instructions should I give to the trading system? Thank you for your understanding and any help you can give me.

    #216964 quote
    GraHal
    Participant
    Master

    if I want the first operation of the day

    If above means first run of the code at day open then you could use (not code as we not sure yet).

    What Timeframe is your Chart running on and what time is day Open day close etc?

    If Time = 08000 (for example) then
    follow these conditions
    Endif

    If Time > 080000 AND Time < 210000 Then
    follow these conditions
    Endif

    Midlanddave thanked this post
    #216965 quote
    robertogozzi
    Moderator
    Master

    There you go:

    ONCE FirstTime = 1
    IF IntraDayBarIndex = 0 THEN
       FirstTime = 1
    ENDIF
    IF myConditions1 AND FirstTime THEN
       BUY 1 CONTRACT AT MARKET
       FirstTime = 0
    ENDIF
    IF myConditions2 AND Not FirstTime THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    GraHal and Midlanddave thanked this post
    #216968 quote
    brian gilbert
    Participant
    Junior

    you are truly wonderful, thank you very much for your precious answers, I will try and then I’ll send you a feedback!!

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

Different instructions for an intraday trading system


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by brian gilbert
2 years, 7 months ago.

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