Split orders during X consecutive bars

Forums ProRealTime English forum ProOrder support Split orders during X consecutive bars

Viewing 14 posts - 1 through 14 (of 14 total)
  • #155819

    Hi everyone,

    I didn’t receive any answer on the French forum so I come here in order to maximise possibilities of being helped while also be more precise.

    That said, here’s the context. One of my strategies enters and exits market based on instructions “buy n shares at market” or “sellshort n shares at market”. That strategy tried lately to buy a number of n shares refused by IG Platform for : BIGGER_THAN_MAX_AUTO_SIZE_OUT_OF_HOURS. IG support told me I must use partial fills or split orders.

    What could be the function allowing orders to be executed during x consecutive bars during which the order will still be active trying to get fully served?

    I haven’t found any example on the the forums on how to address this problem. Any help much appreciated.

    And for the time being, happy new year’s eve to everyone.

    #155823

    TradingFred  – Please respect the forum rules.

    • Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.

    The different language forums are observed by everyone thanks to the translation tool so posting in multiple language forums will not improve your chance of getting an answer.

    It is Christmas week so many regular forum members are away from the forums enjoying their holiday. To expect an answer within two days at this time (or in fact any other time) seems rather impatient.

    If you think you didn’t ask the question clearly enough then add to your original topic to explain yourself better rather than starting a new topic in a different language forum.

    As you have now decided that the English forum is more likely to get an answer I have deleted your identical question in the French forum.

     

    #155824

    refused by IG Platform for : BIGGER_THAN_MAX_AUTO_SIZE_OUT_OF_HOURS.

    As IG set their own conditions such as maximum order size and maximum stop distance etc and that info is not sent by them to PRT there is no way of knowing what position size order you can safely send to market. Without knowing that it is impossible to know how many bars your ‘big’ order needs to be divided over.

    Normally IG move the goal posts at quiet times such as holidays or during times of high volatility.

    #155827

    Hi Vonasi,

    It is noted for my mistake about double posting. Thank you for deletion and reminder of the rule. Besides, I do understand people are on holidays, and that patience is required anyhow.

    Now about my problem, IG upon my request sent me an indicative table as what can be accepted on the relevant instrument with a single order at market. These are only indicative limits for their application depends on liquidity over the market for IG to hedge the position. My understanding is that hedging on IG’s side is automatically handled by their own algorithm which checks on liquidity before proceeding with hedging position. If customer’s order is a single order at market (meaning immediate execution) and that liquidity is insufficient and/or order size is too big, IG sends the message posted above to PRT which in turn refuses orders sent by my strategy before stopping it. Split orders, as advised by IG, could instead get through and in some cases go through IG’s desk for manual hedging over the market. This I know, could take up to 20-25 seconds. It’s ok with me and while it is impossible to know for sure how many bars my orders will need, I don’t have the choice but to proceed as I still want to trade that instrument. My code should read something like as an example : if market cash hours and if number of contracts < corresponding limit in the table then buy n shares at market / if market cash hours and if number of contracts > corresponding limit in the table then split order during x bars. I just don’t know how to code these split orders during consecutive bars, and have been unable to find relevant function in both French & English documentations of PRT. This is why I need your help 🙂

    #155832

    You could use MTF to trade every second 0r every minute and send an order that is within your ‘indicative table’ limits every second or minute.

    However IG only have to set limits outside the ‘indicative limits’ for a short period of time and your orders will be rejected and your strategy stopped leaving you possibly with some orders filled on the market and some orders not filled. The filled orders will be left for you to now manually close or closed for you depending on your account settings.

    The code is possible but it does not guarantee that what you are trying to avoid won’t still happen.

    The broker sets these limits to protect themselves and possibly also protect you and there is a normally a reason for that and so trying to force the positions onto the market might not be wise. Your broker might actually be saving you from yourself.

    #155833

    Hi Vonasi,

    Indeed my trading is based on M15 timeframe and I plan to use MTF with 30 seconds bars. I don’t need MTF to trade within the “indicative table”, this can be done with my strategy in its current state with M15 timeframe and no MTF whatsoever. I am to use MTF to take positions above the limits of that “indicative table”. Above the limits of that “indicative table”, IG will not accept unsplit orders, since they will need to cover these positions manually through their desk thus time requirements and so rejecting at market orders.

    To be clearer if required, split orders is no fancy, but is the way to go at a certain level of capital. Important positions can scare people, people removing their positions leading to market spreads go wild. That’s the reason to split orders when dealing with “big” positions. That’s what bankers do too as a friend who worked at Exane BNP confirmed me. If the code exists my matter is only to replicate that approach with possible constraints as you exposed. Besides, I must say that on my side, I have no time constraints ans as such can work on my businesses, trading being one, as much as I want.

    IG sets limits to protect themselves since when big position is required, as expressed above, they need manual relevant hedging, which requires time and that is the reason why they will reject “at market” orders. As you probably know, IG to protect themselves, takes opposed positions on markets whenever any new trader takes a position. And that’s fair, as 76% of traders lose money when trading IG CFDs. When you are part of the 24%, IG doesn’t cover your positions the same way. As when it comes to protect me, executives I deal with give me written statements that if I want to grow bigger I need to accept partial fills or use split orders, so hopefully there’s a way to code this.

    #155840

    So are you saying that you are happy to send one smaller order under the ‘indicative limit’ every fifteen minutes? I’m guessing not.

    It is not possible for a strategy to send lots of smaller orders at the close of a candle – they will all be lumped together and sent as one big order. However if you use MTF you can make your decision to buy/sellshort on a 15 minute chart and then send smaller orders at each new 1 second candle until you have enough orders sent. They will obviously not all be filled at the same price.

    I also wouldn’t be surprised if IG could see that you had sent lots of orders and that your total at risk was accumulating second by second and so stop taking orders from you.

    #155844

    However if you use MTF you can make your decision to buy/sellshort on a 15 minute chart and then send smaller orders at each new 1 second candle until you have enough orders sent. They will obviously not all be filled at the same price.

    I also wouldn’t be surprised if IG could see that you had sent lots of orders and that your total at risk was accumulating second by second and so stop taking orders from you.

    Hi again Vonasi and my best wishes for 2021!

    I have the feeling we don’t quite understand each other. My strategy even evolving toward MTF won’t ever put my money more at risk than it is now, nor that I plan to use more extensive leverage and/or use of available margin on my account. As your capital grows, orders size grows as well, plain and simple. General use is to actually lower leverage as you grow. Nonetheless, as long as you grow, so does your orders.

    Now, about the function I am looking for, is there a function that can tell PRT=>IG to maintain order for consecutive bars, something /3 which would maintain order during 3 consecutive bars as to let IG desk time to manually process according hedging?

    #155847

     

    1 user thanked author for this post.
    #155860

    Thanks Vonasi for that part of a code I might use for split orders. I will communicate here if I end up using split orders and/or if I need help to finally implement that option with MTF. For the time being, I may choose another option which would be to divide my capital by half and run my strategy on each half. Anyway, as I raised the problem here, I will communicate whatever the outcome will be.

    #155864

    Splitting your orders across strategies running on multiple different accounts would be a way to get larger orders filled without going over the limits.

    #155892

    Splitting your orders across strategies running on multiple different accounts would be a way to get larger orders filled without going over the limits.

    You are right Vonasi, there are ways to naturally split orders before splitting them in the code. Multiple accounts is an option of course. I already have two, one IG and another one PRT/IG, not running the same strategies. I could add some addtional account and run the strategy who’s been reaching lately the maximum available number of contracts (it is actually a number of £/point) on two different accounts. Out of curiosity and because I don’t feel like adding up accounts at this point, I will run twice the strategy on the same account by dividing capital and according number of contracts. As I understood IG, maximum of £/point has to be considered as a single order at market. Twice the strategy meaning two orders, they should pass mutually the number of £/point limitation.

    #155893

    Sometimes there can be delays when two strategies send orders on one instrument at the same time from the same account. Usually this is just a tick or two delay or at worst a few seconds but something to consider. Also perhaps but I don’t know for sure IG would total up all the orders and maybe have an alert system for excessive order quantity coming from one account on one instrument.

    #155924

    You are probably right Vonasi about delays and I will monitore that. It should not be a big deal when you are trading with M15 bars, but it indeed becomes one when your strategy embeds a take profit and a break even that sometimes can be activated or not for 0.1 point of an indice. Also, as I am considering having my strategy evolving toward MTF for better reactivity about break even namely, even though I will have to backest if better reactivity is financially relevant, delays still could be something to consider. I have the document to open an additional account at my disposal and will proceed if I feel it could be more efficient. IG certainly sums up your total position on a single intrument, basically to calculate which margin calculation applies (5% or 15% in my country), but when it comes to the limitation my strategy lately encoutountered it is based on a single market order, two market orders shouldn’t be a problem in that regard. Anyway, when my strategy reaches 50 contracts, and so 100 contracts total, I will communicate to say if I my understanding was correct or not.

Viewing 14 posts - 1 through 14 (of 14 total)

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