closing operations at the end of the candle

Forums ProRealTime English forum ProOrder support closing operations at the end of the candle

Viewing 3 posts - 1 through 3 (of 3 total)
  • #55218

    Hi colleagues,

    One simple questions: I am operating in 4h candles and I want to open and close operations at the beginning and the end of the bar, regardless the outcome. I think I know the answer but I see ackward results in the backtest.

    Example: 090000 bar.

    IF time=090000 AND my conditions THEN

    BUY 1 CONTRACT AT MARKET

    ENDIF

    Now, to close this operation at the CLOSE of the candle (4 hour), shall I refer to 125900 or 130000???

    IF time=XXXXXX THEN

    SELL AT MARKET

    ENDIF

    Thanks,

    Juan 

     

    #55468

    Time refer to the Close of the bar. Code is only read once at Close. You can also use OpenTime which is the time of the bar where the code is read.

    1 user thanked author for this post.
    #55469

    Nicolas,

    Thanks so much as always,

    Juan

Viewing 3 posts - 1 through 3 (of 3 total)

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