Tick-by-tick mode sell when I’m up 3 points

Forums ProRealTime English forum ProOrder support Tick-by-tick mode sell when I’m up 3 points

Viewing 4 posts - 1 through 4 (of 4 total)
  • #141644

    I have an issue backtesting a strategy where I buy at a certain time for example 12:00, and I want to sell when I’m up 3 points. I’s not uncommon that this happens for a brief period within the candlestick, but in those cases the positions doesn’t seem to close (in the backtest). Instead the sell ordered is performed when the next candle starts, at whatever price the instrument is at then. Isn’t the tick-by-tick mode designed for this very purpose? Because it doesn’t seem to make a difference at all for my backtest.

     

     

    #141645

    You can use a pending order, once entered, to exit after 3 pips:

    but it’s very unlikely the broker allows to enter a pending order that close to the current price!

    If you use a, say, 5-minute TF, you could take advantage of the Muti Time Frame support and  check your profit on a low TF, say 10-second TF, and exiting at market instead of placing a pending order:

     

     

    #141728

    Code is always read at candle close, so your SELL instruction is therefore read and executed one bar later if your 3 points condition is fulfilled. Tick by tick is used to test price level intra candle.

    Despite the excellent code that Roberto has shared, why not just using a target profit of 3 points directly attached to your order?

     

     

    #141870

    Ah, I may have been a bit stupid and forgotten about the pprofit function. It seems to do the trick. 🙂 Thanks a lot guys for your input and the clarification of the tick-by-tick functionality.

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

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