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 15 posts - 1 through 15 (of 22 total)
  • #78183

    Hi,

    Recently I have noticed when I have been doing back test that my orders are being closed as soon as they are opened(within miniseconds). I was wondering if anyone else has faced this same issue ?

    I also experienced this issue when I tried to run the automated trading on an IG demo account. So as you can imagine I am very concerned about running a live test untill I find a fix for this issue.

     

     

    #78198

    To be able to replicate the trades you should post:

    1. code
    2. instrument
    3. TF

     

    #78199

    What time frame are you trading on? 1 second?

    This topic may need to be moved to the ProOrder forum rather than be in the Platform Support forum as I suspect it is a strategy issue rather than a platform issue.

    #78225

    Hi Roberto,

    sorry for that. I thought maybe they was an update or something as the code was working fine previously. Please find attached the code that I am using on the autotrade stystem.

     

     

    #78226

    Hi Vonasi,

    Thanks for getting back to me. Just wondering if you have ever come across an issue like this before ?

    I am using a 10 minute timeframe. Both on the chart and on the automated system.

    The system is being used in conjunction with IG.

     

    Kind Regards,

    Simone

     

    #78227

    my orders are being closed as soon as they are opened(within miniseconds)

    I’ve had above Issue before, but I can’t recall what caused it (it was a coding issue though) it will probably come to me as I go about my activities today.

    I’ll let you know.

    #78228

    Sorry, I don’t have the code to replicate those indicators, if you post them then you should also specify TF and instrument used.

    Try replacing line 32 with

    but that’s just guessing!

     

    1 user thanked author for this post.
    #78234

    Yes I think line 32 is the problem because if at the time of entry c1, c2, c3 and c4 conditions are all met then it will place a sellshort order and an exitshort order at the same time. You need to make the conditions return a 1 or 0 and graph them to see what they are doing at each entry.

    1 user thanked author for this post.
    #78244

    Hi Grahal,

    Thanks for reaching out.

    I really hope you do as I am really stumped.

    Kind Regards,

     

    #78245

    Yes I think line 32 is the problem because if at the time of entry c1, c2, c3 and c4 conditions are all met then it will place a sellshort order and an exitshort order at the same time. You need to make the conditions return a 1 or 0 and graph them to see what they are doing at each entry.

    Still it’s odd, since ProOrder needs a full bar to be able to detect an ONMARKET status, thus line 33 should not be executed, unless ProOrder does not test the ONMARKET status but sends the order to the broker, instead, or he uses a 1-second TF!

    #78246

    Hi Roberto & Vonasi,

    Thanks for taking the time to go through the code. I appreciate all the suggestions

    I have simplified the code and started from scratch in an attempt locate the issue.

    So please find attached the new simplified code that is throwing up the same issue of closing before it opens. However it should be noted that it is doing it less often than before.

    Looking forward to your suggestions,

     

    Regards

     

     

     

     

    #78247

    Line 14 will always be true and line 22 will always be false.

    Please post the correct lines!

    #78250

    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!

    #78251

    Still it’s odd, since ProOrder needs a full bar to be able to detect an ONMARKET status, thus line 33 should not be executed, unless ProOrder does not test the ONMARKET status but sends the order to the broker, instead, or he uses a 1-second TF!

    …..going back to that first code – there is no check for ONMARKET status to be met for line 33 so if the exit conditions c3 and c4 are met then an exit order will be sent at the same time as a buy order.

    From that first code:

     

    #78252

    EXITSHORT should NOT be interpreted as a BUY order, but the EXIT of a SHORT trade. If there’s no SHORT trade open then EXITSHORT should be ignored, isn’t it?

Viewing 15 posts - 1 through 15 (of 22 total)

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