defining variables each morning

Forums ProRealTime English forum ProOrder support defining variables each morning

  • This topic has 4 replies, 2 voices, and was last updated 6 years ago by avatartav.
Viewing 5 posts - 1 through 5 (of 5 total)
  • #41126
    tav

    How do I define a variable in the morning before trading?

    I would like variable traded=0 each morning until a trade has occured then traded=1 for rest of trading day.

    #41133

    You must first decide what is your trading time.

    Example if you only want to have the variable “traded” set between 10:00:00 and 19:00:00, each day (of course this won’t work in a Daily, or greater,  timeframe):

    Roberto

    #41192
    tav

    ok thank you. I have it as you have shown it but I want trade=1 when another condition is fulfilled ie when a trade has happened. The problem I’m facing is traded randomly sets to 1 just before the condition is fulfilled usuallyjsut before DEFPARAM FlatBefore = 080500. |Does DEFPARAM FlatBefore  affect variable initialisation?

    #41245

    DEFPARAM FlatBefore does not affect variables, it affects conditions, though, because trades will not be triggered even if all conditions are met (but variables still retain their values as set at each new bar).

    To combine other conditions you may add them as follows:

     

    #41332
    tav

    thank you

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