Program a delay or wait

Forums ProRealTime English forum ProOrder support Program a delay or wait

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

    Would anyone know how to program a ‘WAIT’ into code in for  automated trading. In other words, in auto trading I have code that says buy or sell when one MA crosses over another.

    However when that happens I want to wait until my DEMA has changed direction as well.
    Any idea how to write code to ‘wait’ for a number of indicators to happen over a 5 minuteperiod while in the 1 minute timeframe before buying or selling. Appreciate in advance any help

    #46355

    Just save the first condition in a variable and check for the second condition to be met during the next 5 bars. Is it met, you buy, if not you start the process again waiting for the first condition.

    #46391

    Thanks for that… Im new but getting the swing of it……

    #97970

    Hi

    Did you ever get to see an example of how to implement this?

    regards

    James

    #97981

    When your condition is met, just look back n bars to detect any crossing.

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