External Input to algo

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #226195 quote
    ashehziashehzi
    Participant
    Average

    Hi,

    I know we can use input variables to the algo but is there a way that allows it to only execute the orders if the input variable has been updated today e.g.

    Input variable x = 15 // comes from variable optimisation – definition of variables, x as integer with fixed value

    If x updated today then

    if longCond then

    endif

    endif

    Or can I make the algo stop by end of the day so that only once variable has been input, I have to manually start it for rest of the day? like a default stop or expiration but I don’t want to change the expiration global parameter to impact other auto algos.

     

    Thanks

    Ash

    #226198 quote
    GraHalGraHal
    Participant
    Master

    Will QUIT do what you want?

    QUIT

    ashehzi thanked this post
    #226201 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    No input data is available.

    Yo update any variable you need to stop the strategy, modify any value you wisj, then restart it. So whenever you restart it you know if any data have changed.

    #226203 quote
    ashehziashehzi
    Participant
    Average

    Thanks, I think QUIT is the best way to do it e.g. QUIT at US Close so I know it won’t run itself again unless I modify the external input. Also, after I posted, I was thinking another way could be to use Arrays to store last value of the input variable but frankly haven’t used arrays in algo yet but have used it in indicators alot.

    Thanks both.

    #226204 quote
    GraHalGraHal
    Participant
    Master

    My experience of arrays is that optimisation takes forever and if I recall correctly, Algos get stopped, due – in my opinion – to exceeding the time allowed to execute the code.

    Th error message in above stoppages is the one for ‘not enough historical data’ (again my opinion).

Viewing 5 posts - 1 through 5 (of 5 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

External Input to algo


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ashehzi @ashehzi Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by GraHalGraHal
2 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/10/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...