HELP >> Function CLOSE not working (it does not check price levels properly)

Forums ProRealTime English forum ProOrder support HELP >> Function CLOSE not working (it does not check price levels properly)

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

    Hi Traders,

    I am starting this thread as a continuation from the previous one here, where I got your help to classify and count trades as a WIN or a LOSS, although where there is still an important issue left to resolve based on the following summary below:

    1. This is a bracket order system. It should LONG if price crosses ABOVE the HIGH of the 0945-1000 bar and go SHORT BELOW the LOW of the 0945-1000 bar (I use a BUFFER to add/subtract to the HIGH/LOW but this variable works really well)
    2. I am using a 15m interval
    3. The code is using the function CLOSE to compare/check the price with 2 other price levels (the 2 entry points above/below the 0945 bar)
    4. Although it looks like a simple calculation to make, its behaviour is very erratic
    5. It seems that it only does that check at the end (CLOSE) of the 1000 bar and onwards, essentially not doing any check for the first 15 minutes.
    6. On top of that, there are several circumstances where the CLOSE of a bar is above the pre-defined HIGH and the trade isn’t placed. (example attached)
    7. Is there a way to compare the current price with the entry points right from the 1000 start?
    8. Would the only “fix” be to change the interval to 1m but still define the entry points based on the 0945-1000 bar?

      As always, I really appreciate your comments and suggestions. I have researched this topic on other threads but wasn’t able to find something that suits my needs.

     

     

    Many thanks

    tiago

     

    #242665

    1- Your variable : MaxCandleLength is not defined

    2- if you want the code to trigger the buy when price go above HI+Buffer, then you should use High instead of Close

    if you code like this : If Close>HI+Buffer then, it means the Close of the candle at THE END OF THE CANDLE

    So the candle that triggers the buy is the one that really CLOSE above, and the buy order is executed at the opening of the next bar…

    Everything is normal here!

    #242666

    From my point of view, if you want to have accurate breakout/breakdown, the best is to have 2 Closes above or under your limits…

    It is better than using a buffer that you add there… The horizontal supports and resistances are often checked with the wicks and sometimes broken by one close and then the next candle go reversal. So 2 best test for a true breakout is to have 2 bars that close above

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