Orders are closing as soon as they are opened

Forums ProRealTime English forum ProOrder support Orders are closing as soon as they are opened

Viewing 7 posts - 16 through 22 (of 22 total)
  • #78255

    Line 29 is not allowed (despite being documented), you cannot combine two kind of SL at the same time and, if you separate them on two lines the second line will overwrite the previous one!

    Your right I do apologise as I compared indicator 1 against indicator 1- when it should of been indicator 2. However I fixed this issue. So just to confirm the error is on the automated coding level and not at the indicator level ?

     

    Further I am using the 10 minute time frame. As you can see on the attachments

     

    Even when using the simplified creation tool(code below) I get the same error of orders closing as soon they they are placed.

    Thanks again for all the input.

    Regards,

    Simeon

    #78264

    It seems to be working perfectly, always exiting due to the TRAILING stop. I embedded the indicator in the strategy (but this shouldn’t affect results):

     

    1 user thanked author for this post.
    #78275

    Hi Roberto,

    I cant thank you enough. Its great to know that my code works.

    When I did go through the losers , It seems the issue is still somewhat present as can be seen in the attachment below(I am not sure how clear it is so I have also typed them out below).

    Considering that the code works from a technical standpoint. Is this just a byproduct of the code(sometimes it will close orders as soon as they are opened) ?

    1 August OPEN: 20:50 CLOSE:20:50

    2 August OPEN: 14:50 CLOSE:14:50

    2 August OPEN: 15:00 CLOSE:15:00

    2 August OPEN: 17:40 CLOSE:17:40

    2 August OPEN: 17:50 CLOSE:17:50

    2 August OPEN:18:40 CLOSE:18:40

     

    Regards,

    Simone

     

    P.S the 2nd attachment showing a chart on  IG shows the corresponding price for the 2 August 17:40 close out. As I believe the order shouldn’t of closed as on the following 3 candles the current high is lower than the previous high.

     

     

     

     

     

     

     

     

     

     

     

     

     

    #78280

    It works perfectly, I rarely experienced 0-bar trades, some are those you posted, but all of then are closed due to trailing stop.

     

    #78289

    Hi Roberto,

    You are right. When I take away the ptrailing the orders don’t seem to close straight away.

    But as a trader it is very very rare for a stop to be hit in a second. ptrailing is points correct(because i set ‘ptrailing’ at 20 pips away from buy price) ?

    Anyway I thought it best to remove the ptrailing and find another solution as stops/limits seems to do more harm than good.

    Regards,

     

     

    #78290

    But as a trader it is very very rare for a stop to be hit in a second. ptrailing is points correct(because i set ‘ptrailing’ at 20 pips away from buy price) ?

    Yes, right.

    • $Trailing  = sets trailing stop in units of your currency
    • Trailing    = sets trailing stop as a difference in price (say 0.0015) away from the price
    • pTrailing  = sets trailing stop as a number of pips (say 15) away from the price

     

    #78296

    Topic moved to ProOrder forum.

    FYI, trailing stop are not allowed for limited risk accounts, if your live or demo account is a limited risk one, the backtest behavior should reflect this limitation.

Viewing 7 posts - 16 through 22 (of 22 total)

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