Order, profit and stop loss triggered wrong

Forums ProRealTime English forum ProOrder support Order, profit and stop loss triggered wrong

Viewing 9 posts - 1 through 9 (of 9 total)
  • #83575

    Hi brothers, I want to ask another thing, I searched in fóruns already and I didn’t read anything to help me solve my problem.
    I have a code simple like this one, but when I run the backtest, the buy entry is always at the close of the previous bar level and not at the high level. And the stop is the same thing, it didn’t stop at the low of the previous bar and close at the low of the actual. Thanks

    #83576

    Your buy at a limit (better) price should work as you describe – are you allowing for spread?

    SET TARGET and SET STOP expects a distance and not a level or price so your SET TARGET should work (use SET TARGET pPROFIT to look for it in pips) but your SET STOP is unlikely to ever be hit.

    You have a typo in line 6 as an AND is missing.

    An image would help to show where you think a trade is being opened or closed incorrectly.

     

     

    #83581

    Thanks brother, I am starting to understand better now.

    But I didn’t understand the spread thing, ig spread is 0,3 so it’s 0.003 right?
    In this picture it’s buying on the close of the candle and not at the higher. And it’s not stopping.

    #83583

    In the image it does exactly what you have coded.

    Screenshot_5-1

    #83592

    I tough that the spinning top was the high[1] now my brain is bugging…

    #83593

    0,3 spread is 0.00003 (three tenths of a pip), not 0.003!

    Set stop loss low[1] is WRONG, as Vonasi pointed out. It requires a difference in price (such as CLOSE – LOW[1]), not a price. Dax is quoting about 11,200, so it would be 11,200-PIP stop loss and will never get hit (your account would be wiped out long before that).
    #83598

    Thanks guys, sorry for those beginners questions.
    I fixed the sell entry but the stop is not changing, no idea how to set the stop to stop at the high of the same candle that the entry was done.

    #83602

     

    #83628

    Thanks guys really 🙂

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

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