Open/ Close on spike ??? HELP

Forums ProRealTime English forum ProOrder support Open/ Close on spike ??? HELP

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

    Hi, I’m trying to understand how to set the opening / closing of any position (long, short) when the price reaches for example the bollinger bands or a simple moving average.

    The problem is given by the fact that whatever I put, the backtest ALWAYS closes my positions at the close of the candle, if I put “close position if it is> or = for example at the 20-period moving average, this waits for the first candle that actually CLOSES above that moving average, and maybe the other 5 candles before had far exceeded the above moving average with spikes, but then they had simply closed below and therefore kept the position open for me .. and same thing with the bollinger bands, I can put close if it crosses bullish, if it is greater than or equal to the upper band, but we always talk about closing the bar! doing so many strategies don’t work because the price is given by all its fluctuations in that candle, and not only by the opening and closing.

    I hope I have explained my need well and I hope it is possible to give this command, possibly from the “simplified” commands, otherwise also from the command lines if it were the only possibility.

    Thank you in advance

    #160355

    Code is always read at Close and orders sent at next open. In order to act during a bar, you have 2 options: use pending orders at the desired levels you want the orders to trigger, or use an inferior timeframe to trigger orders with conditions based on the strategy timeframe, there are many examples around.

    #160366

    Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.

    I had already warned you in the other topic on the italian forum.

    And I already answered your question!

    There are rules that you must read and respect for the sake of everybody, they are highlighted in yellow just below.

    In any community it’s rules that make life easier.

    Thank you 🙂

     

     

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