External Input to algo

Forums ProRealTime English forum ProOrder support External Input to algo

Viewing 5 posts - 1 through 5 (of 5 total)
  • #226195

    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

    Will QUIT do what you want?

    https://www.prorealcode.com/documentation/quit/

     

    1 user thanked author for this post.
    #226201

    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

    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

    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)

Create your free account now and post your request to benefit from the help of the community
Register or Login