Close of cross-over candle

Forums ProRealTime English forum ProOrder support Close of cross-over candle

Viewing 8 posts - 1 through 8 (of 8 total)
  • #16206

    Hallo there,

    Please help me.

    I want to calculate the Close of the candle (c1 above) when the cross-over occurred (or just after the cross-over occurred). I want to enter a trade once a candle following the cross-over closes above the close of the cross-over candle.

    #16220

    You need here to store the Close value when your condition c1 occurred:

    Then you can test if the next Closes will cross over this value. But it’s also possible that the price is already above this level .. so you have to deal with this too.

     

    #16226

    Thank you Nic, you’ve put me on the path to success.

    I amended my code but now don’t get any Long entries. Can you possibly see what is wrong with my code?

     

     

    #16237

    You should GRAPH you new “val” variable and see if it correctly stored the good information, also with Close to test the cross over “visually”

     

     

    #16242

    I haven’t tried it, but isn’t there a “DO” missing in line 18 for the “While… Do… Wend”?

    #16243

    Hi, me again,

    I amended the code but it still doesn’t create Long positions.  After the initial cross-over, I wait for confirmation (c2 and c3), which could be a few candles down the line, before I enter a trade (post confirmation). Does my code reflect this?

     

    #16250

    For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<

    Did you learn something while debugging with GRAPH? Do the “val” variable correctly stored? Do the Close cross above it sometimes? ..

    #16259

    Hi Nic,

    I will comply with the “insert code PRT” requirement.   Thanks for pointing that out.

    The “val” variable and Close variables are correctly stored and displayed on the graph. If I look at my chart, there are many instances where a candle following the cross-over candle closes above “val” but the code doesn’t trigger the respective entries so I can’t do proper debugging. Please see attached screen dump.

    Thanks

     

     

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

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