Order rejection

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #184537 quote
    micquan
    Participant
    Junior

    I am using IG and PRT. I have about 7 simple strategies running in Pro Order recently and they have not generated any trade or open any position – there is a rejection “order rejected by the broker” WHY? Am I not deploying the scripts to Pro Order correctly?

    Snip20220104_7.png Snip20220104_7.png
    #184541 quote
    JS
    Participant
    Senior

    Hi @micquan

    So there are orders generated by your systems but they are rejected by the broker (IG).

    This can have several causes:

    Wrong limit order prices

    Minimum stopping distance too small

    Margin insufficient

    Etc.

    #184559 quote
    GraHal
    Participant
    Master

    Or maybe your position size is below the minimum for the Instrument you are trading?

     

    there is a rejection “order rejected by the broker”

    Only one??

    So maybe, in the other 6 strategies,  the Buy / SellShort conditions have not occured?

    #184675 quote
    micquan
    Participant
    Junior

    Currently, I am testing the prt / ig system and integration, as well as operational testing before I do further development. The code are very simple, see below. For the Grid Trading strategy, set the entry prices 19$, go long and exit when the profit is above or equal to 10%. The minimum number of contracts/points is 100 points. This script was rejected. Also, why are these scripts ONLY get invoked at 19:00 hours, see attachment.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated

    // Conditions to enter long positions
    c1 = (close >= 19)
    c2 = (close < 19.50)

    c3 = (close >= 19.50 )
    c4 = (close < 20)

    c5 = (close >= 20)
    c6 = (close < 20.50)

    IF (c1 AND c2) OR (c3 AND c4) OR (c5 AND c6) THEN
    BUY 100 PERPOINT AT MARKET
    ENDIF

    // Stops and targets
    SET STOP %LOSS 50
    SET TARGET %PROFIT 10

    Snip20220105_8.png Snip20220105_8.png
    #184679 quote
    GraHal
    Participant
    Master

    You serious about this … I needed funds of £1,000,000 to get the strategy to run and then to only make £1K in 8 months??

    Do you get same as me … see attached?

    Volat.jpg Volat.jpg
    #184681 quote
    JS
    Participant
    Senior

    Hi @micquan

    When using this strategy, you must consider that you are trading between two fixed boundaries (grid), in this case a maximum of 20.50 and a minimum of 19.

    When your strategy wanted to execute a trade, the VIX was already above 20.50 so it was rejected.

    Your time frame is a day and you activated the system January 4th at 18:00

    Your first candle closes on January 5 at 18:00 (+ 1 hour time difference) is 19:00.

    So, the system tries to make its first trade at 19:00 but it is rejected for the above mentioned reason.

    The margin for a 1 euro contract is 20% so total margin for 100 contracts is:

    22 x 100 x 20% = 440 euros

    GraHal thanked this post
    #184682 quote
    JS
    Participant
    Senior

    Also move your Set Stop & Set Target above the last EndIf so that they will only be activated when you actually Buy.

    #184685 quote
    micquan
    Participant
    Junior

    Hi @GraHal, It’s a simple grid trading strategy which I want to develop further. I just started using autotrading tools prt and still have a long way to go before I develop something sensible and useable but I have to start somewhere or nothing at all.

    #184686 quote
    micquan
    Participant
    Junior

    Hi JS, I will try to use the info you provided to improve this strategy and script, and get it to do something. Thanks

    #184687 quote
    micquan
    Participant
    Junior

    Hi GraHal and JS, As said before all my strategies are very simple to get me started learning PRT. This one also got triggered at 19:00 – please explain.

    Snip20220106_15.png Snip20220106_15.png
    #184689 quote
    micquan
    Participant
    Junior

    Hi GraHal,

    On my system it’s 255k funds on the equity curve and the back test has a gain of 143k over 8 months. See attachment. Am I right or am I missing something? Why is the funds have to be so high?

    Snip20220106_17.png Snip20220106_17.png
    #184691 quote
    JS
    Participant
    Senior

    Hi @micquan

    In your VIX – ROC strategy, indicator1 is the same as indicator2…it must crosses over 0 and must be > 10 at the same time which is impossible…

    Set your StopLoss right after Buy, so it will only be activated when actually buying, otherwise it will be rejected…(no limit)

    #184692 quote
    JS
    Participant
    Senior

    Edit: sorry not really awake yet…

    Your indicators are correct only you place a Stop%Loss of 50%

    #184694 quote
    GraHal
    Participant
    Master

    Am I right or am I missing something?

    Are you trading Volat Index(DFB)?  You are showing 10 Contracts on your backtest.
    Even at 10 Contracts, could you sleep at night with the $42,000 Drawdown showing on your results??
    $42,000 Drawdown is over 40% of your starting capital of £100,000!

    According to my Platform, the minimum position size is 100 Contracts … see attached at red arrowhead.

    Volat-2.jpg Volat-2.jpg
    #184710 quote
    nonetheless
    Participant
    Master

    if you’re just starting out with PRT, I would strongly advise you to stick with the DOW, DAX, SP (US 500) or NASDAQ (US tech 100) as they have the lowest spreads. In % terms, the VIX is over 100x more expensive to trade than the DAX (0.725 vs 0.007), it’s like swimming with a rock tied around your leg.

    Some of these ’boutique’ indices may seem sexy but the simple fact is that (generally speaking), all indices do the same thing – they go up and they go down and you’re trying to catch some of that movement. There’s no big magic in trading this one as opposed to that one. Don’t make it more difficult for yourself by starting every trade with an enormous hill to climb just to get past the spread.

    There are also certain foundational principles that are worth considering. Your stoploss is 5x higher than your target profit. Very difficult to make that work in the real world. I have never seen a successful algo where the stop was greater than the target. It might be possible, but for me it’s a big red flag. Not to mention that your 50% stop would be quickly ruinous.

    More typical (and more sane) would be 1% stop, 2% target (or something like that…)

    best of luck!

    GraHal thanked this post
Viewing 15 posts - 1 through 15 (of 23 total)
  • You must be logged in to reply to this topic.

Order rejection


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
micquan @micquan Participant
Summary

This topic contains 22 replies,
has 4 voices, and was last updated by JS
4 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/04/2022
Status: Active
Attachments: 7 files
Logo Logo
Loading...