Pending Order to close position in choppy market

Forums ProRealTime English forum ProOrder support Pending Order to close position in choppy market

Viewing 2 posts - 1 through 2 (of 2 total)
  • #180207

    Hi . I am trying to write a code to exist at breakeven point  when I am in the market and the chance of market going my way is diminishing. I am using pending orders and place them based on how far the price goes in each direction. I backtested it and noticed that whenever the pending order is triggered it closes my existing position and simultaneasly opens opposite direction position. e.g. If I am Long on market it closes my long and opens a short at the same time. Just wondering what I am doing wrong here:

     

     

    #180208

    BUY is used to open a Long position (after closing any open Short position, in which case it does a Stop & Reverse).

    SELL is used to exit a Long position.

    SELLSHORT is used to open a Short position (after closing any open Long position, in which case it does a Stop & Reverse).

    EXITSHORT is used to exit s Short position.

     

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

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