Why did ProOrder stop here?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #143028 quote
    Mike Boorman
    Participant
    Average

    Hello folks,

    Hopefully you can help me here.

    My program stopped with an open trade as soon as the market opened on Sunday night/Monday morning. The only information I can get from PRT is “order cancelled” – there is no other explanation. This same code has carried trades overnight before so I can’t understand why it couldn’t handle the next market open (the gap was in favour of the trade so it shouldn’t have triggered any exit conditions). I’ve attached a screengrab of the market and the code. Could anyone explain why the program stopped itself?

     

    //-------------------------------------------------------------------------
    // Main code : /////Live ZUS30 zig A28 II
    //-------------------------------------------------------------------------
    DEFPARAM CumulateOrders = False
    
    slmove = 5
    
    longentry1= close crosses over SuperTrend[1.5,34]
    shortentry1= close crosses under SuperTrend[1.5,34]
    longexit1= slprice
    shortexit1= slprice
    
    zig1start=101000
    zig1end=105000
    zig2start=124000
    zig2end=132000
    zig3start=152800
    zig3end=160800
    zig4start=0
    zig4end=0
    
    
    if intradaybarindex=0 then
    entryflag=0
    endif
    
    
    if time =zig1start then
    entryflag=1
    endif
    if time =zig1end then
    entryflag=0
    endif
    
    if time =zig2start then
    entryflag=1
    endif
    if time =zig2end then
    entryflag=0
    endif
    
    if time =zig3start then
    entryflag=1
    endif
    if time =zig3end then
    entryflag=0
    endif
    
    if time =zig4start then
    entryflag=1
    endif
    if time =zig4end then
    entryflag=0
    endif
    
    if not onmarket and entryflag=1 and lowest[4] <= lowest[45] and longentry1 then
    BUY 1 PERPOINT AT MARKET
    entryflag=0
    sl= AverageTrueRange[14](close) * 7
    slprice = close - sl
    endif
    if not onmarket and entryflag=1 and highest[4] >= highest[45] and shortentry1 then
    Sellshort 1 perpoint at market
    entryflag=0
    sl= AverageTrueRange[14](close) * 7
    slprice = close + sl
    endif
    
    if longonmarket and high - sl > slprice + slmove then
    slprice = high - sl
    endif
    
    if longonmarket and close < longexit1 then
    sell at market
    endif
    
    if shortonmarket and low + sl < slprice - slmove then
    slprice = low + sl
    endif
    
    if shortonmarket and close > shortexit1 then
    exitshort at market
    endif
    
    Set stop ploss 300
    
    Screen-Shot-2020-08-31-at-09.55.54.png Screen-Shot-2020-08-31-at-09.55.54.png
    #143101 quote
    GraHal
    Participant
    Master

    I’ve had a few Systems in the last week or so with no error message and the Trade showed as cancelled in the Order List.

    Mine were on my Demo Platform, were yours also?

    #143111 quote
    Nicolas
    Keymaster
    Master

    The “order cancelled” is coming from your broker, not from ProOrder. I think that it is surely in relation with the gap that happen on that particular candlestick.. slippage? A market order should not be cancelled BTW.. so I don’t really know what happened here. If this happened on a live account, then you should ask your broker with the ticket order number for them to investigate.

    Mike Boorman thanked this post
    #143115 quote
    Mike Boorman
    Participant
    Average

    GraHal:

    This was in real life, not demo mode. As it was, it only cost me a small amount of money, but if the market had kept running onwards in my favour I’d have been mightily pissed off!

     

    Nicolas:

    The gap would make sense as a reason if it was a gap downwards and caused my trailing stop to trigger, but it was upwards and in my favour because it was a long trade. I’ve got no profit take on there, so it should have just carried on as normal.

    GraHal thanked this post
    #143116 quote
    Nicolas
    Keymaster
    Master

    Indeed, keep us inform of what IG will reply to you.

    #143877 quote
    Mike Boorman
    Participant
    Average

    I just got this back from PRT: “Your ProRealTime platform tried to adjust your stop according to your code, as the market had just opened.
    However, the broker rejected the orders because they considered the market as closed.”

    I still haven’t had a reply from IG about this. Very strange that IG sent the message that the market had opened, but then decided it was closed once it started processing my stop request. Why would a bar start but then stop? When does that ever happen?!? None of this makes sense at all.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Why did ProOrder stop here?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Mike Boorman
5 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/31/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...