Different instructions for an intraday trading system

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

    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
    GraHalGraHal
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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 gilbertbrian gilbert
    Participant
    Senior

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

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 gilbertbrian gilbert
3 years, 2 months ago.

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