Trading system automatically stopped

Forums ProRealTime English forum ProOrder support Trading system automatically stopped

Tagged: 

Viewing 15 posts - 1 through 15 (of 36 total)
  • #115742

    Two of my strategies are constantly being stopped and I have a hard time finding out why. I never encountered this problem before and the only two differences from other strategies, are that I normally use 5 minutes charts and above and in these two cases I use 1 minute charts. The other difference is that I have set the “DEFPARAM CumulateOrders” to true, which I normally not use.

    It toggles between two error messages, apparently randomly.

    The first error message relates to the preloadbars setting:

    This trading system was stopped because the historical data loaded was insufficient to calculate at least one indicator during the evaluation of the last candlestick. Please increase the number of preloaded bars with the instruction DEFPARAM in the code of your strategy (ex: DEFPARAM Preloadbars = 2000). For additional assistance, please refer to the help text of the DEFPARAM function in the trading systems programming manual.

    The maximum period used in the strategy for calculations is 51 and no matter if I set it for 100, 200 or the default value 2000, it still doesn’t work. I can even delete the parameter without any change.

    The second error message relates to order rejection:

    One of the orders of this trading system was rejected. Due to the type of rejection, the trading system had to be stopped. To see the reason the order was rejected, open the order list, go to the”Canceled/Rejected” tab and place your mouse over the warning icon in the “Status” column.

    This is incorrect, since it never comes to a point where it actually tries to open a trade and the order list is always empty.

    For the Nikkei index I use DEFPARAM FLATBEFORE = 010000 and DEFPARAM FLATAFTER = 073000, but I can start the strategy at e.g. 9.30 and it is stopped a few minutes later.

    I can read in another (very emotional) thread, that this kind of error is believed to reside on IG side, but how can that be the case if the strategy is stopped even before it tries to open a trade? Most likely my lack of knowledge on the interface between IG and PRT, but could someone shed light on this?

    Is there a solution to this problem?

    #115759

    Have you got two very similar version of the same strategy running?

    I ask as I do several versions often and I frequently get Systems stopped because it seems IG cannot handle 2 Orders from the same Account for the same Instrument on the same Timeframe at the same time etc.

    1 user thanked author for this post.
    #115762

    The coding is very similar, but one runs on DOW (Wall Street) between 9.00 and 21.59 and the other one runs on Nikkei (Japan 225) between 1.00 and 7.30. So they do not overlap in time. Of course when you set the cumulateorders to true, you will eventually have 2 orders from the same account, but as I wrote, both strategies are stopped even before they try to place orders.

    1 user thanked author for this post.
    #115768

    To see the reason the order was rejected, open the order list, go to the”Canceled/Rejected” tab and place your mouse over the warning icon in the “Status” column.

    What error message does it show when you do above?

    Ah gotcha … there is no entry to show anything??

    Yeah I have had a few of these lately … no entry / no error message.

    Best to restart the System and see if it gets stopped again??

    1 user thanked author for this post.
    #115770

    Thanks GraHal, but I restarted many times

    #115771

    Okay next best thing is to post the code on here and then the coding Wizards may spot something that is making it fail?

    Also I would run the code on my Platform and see if I can spot a fix by trying a few things.

    1 user thanked author for this post.
    #115833

    Please post the whole code or give the list of indicators used, thanks.

    1 user thanked author for this post.
    #115990

    Hi Nicolas and GraHal

    I spend the weekend trying to find errors in the code, but it became a “needle-in-a-haystack” exercise. I would appreciate if you would take a look at it and see if you can spot any errors.

    By the way: the code works fine in backtesting.

    Thanks

    JASS

     

    #115993

    JASS – Please use the ‘Insert PRT Code’ button when posting code to make it easier for others to read.

    I have tidied up your last post 🙂

    1 user thanked author for this post.
    #116025

    Timezone is Denmark (UTC +1) Yes?

    So I am deducting 1 hour from times in the code to get to UK time (UTC +0)?

    Why don’t you use below as Line 8 ?

    I’ve set it going on my Platform so I take I will have to wait until it tries to take a Trade (every few days) then I may get a rejection?

    1 user thanked author for this post.
    #116027

    Timezone Denmark, correct.

    It really doesn’t matter if I preload 100 or more bars, since my maximum period for calculations is 51.

    Exciting to see if you are stopped out too.

    #116028

    In UK time will be 00.00-06.30

    #116031

    It really doesn’t matter if I preload 100 or more bars, since my maximum period for calculations is 51.

    Well as you are getting the … insufficient preload bars error message … it is worth trying more preload bars.

    Anyway I’ve set my preloads bars = 10000 so we shall see what we get.

    Btw if you leave it off altogether then the default for preload bars is 2000.

    1 user thanked author for this post.
    #116034

    Hey we don’t have to wait days … I’ve been rejected already … see attached.

    So the reject is when the code is read not when a trade is attempted??  is this what you have been getting also??

    Makes it easier to fault find anyway as it keeps the momentum up as we can keep onto it etc.

    I’ve got 2 versions running now … one with Cumulative = True one with False …

    1 user thanked author for this post.
    #116037

    Both versions rejected!

    Weird as it is not every minute … I had to wait several minutes for the reject and yet the Timeframe is 1 min so the code would be read every minute (or should be!?).

    No Reject listed in the Orders List so I cant see the exact time of Reject!

    1 user thanked author for this post.
Viewing 15 posts - 1 through 15 (of 36 total)

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