Help debugging code. Not operating everyday. Why???

Forums ProRealTime English forum ProOrder support Help debugging code. Not operating everyday. Why???

Viewing 6 posts - 1 through 6 (of 6 total)
  • #39106

    Hi everyone,

    I posted this same code yesterday, and out of the blue (I don’t know why) now it does not operate everyday.

    It is a very simple breakout system with a reverse stop in case that the first trade does not work.

    The only problem is that only launches an average of 5-6 operations a month. I am playing with the INTRADAYBARINDEX command but nothing.

    Thanks a lot,

    Juan

    #39108

    Hi Juan, I answered your question in the other thread here: https://www.prorealcode.com/topic/help-identifying-a-mistake-in-this-simple-code/

    Is this the same problem?

    #39112

    Hi Nicolas,

    Yes and yes. You gave me a solution yesterday but it didn´t seem to work completely. I have a tried to fixed myself but I don’t know why, the system doesn’t launch operations everyday.

    Ideally, it should launch one order (everyday after 08:00) once the price breaks the upper or lower limit of the channel formed with the range of the previous candlesticks (from 07:00 to 08:00), and in case of a negative outcome, it launches a reversal order after the stop loss is closed. That is it. No more trading until next day.

    I made it (with your instructions) to trade once a day and to launch a reversal order after the first stop loss, but somehow it only works 10 days a month. I have also removed the Maximum Range of 32 pips for the Channel, but that is not the problem.

    Thanks,

    Juan

    #39126

    As I wrote yesterday in the other topic, you have to set your pending order at each bar .. but you disallow them after only 1 bar with your lines 36 and 44. So if the price doesn’t breach your upper or lower levels at the first bar, you’ll never get trade the rest of the day, because no new pending STOP orders are set!

    #39127

    Please read once again the code I posted yesterday: https://www.prorealcode.com/topic/help-identifying-a-mistake-in-this-simple-code/#post-38995

    Just copy/paste.

    #39128

    Hi Nicolas,

    Sorry, I will pay more attention next time. You are completely right!!! It works!!! I was just right there.

    Thanks,

    Juan

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

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