Trading with decimal quantities possible on ProOrder Live!

Forums ProRealTime English forum ProOrder support Trading with decimal quantities possible on ProOrder Live!

Viewing 15 posts - 1 through 15 (of 52 total)
  • #39808

    As the title indicates, it is now possible, following an update of today, to have quantities of lots / contracts / shares with decimals!

    Thus, we can now buy 1.25 contracts on the DAX for example:

    The accuracy is 2 decimal places, and there is a minimum amount defined by IG per instrument (visible in the quantity selector in manual trading).

    The calculation of market exposure will now be much more precise, it seemed important to point out! This is very important information 🙂 Do not hesitate for any questions!

    Total of 11 users thanked author for this post. Here are last 10 listed.
    #40285

    Thanks! But it is not possible during back-testing?

    #40292

    It should work also with backtesting, why this question? Did you encounter a problem?

    #40317

    Yes, I actually tried it yesterday before I read this, but I guess I messed up the code. It worked perfectly today!

    #40646

    I called IG today and asked for some details.

    In the DAX, for example,  minimum size is still 1 mini contract.

    However, it is now possible to buy 1.25 contracts, as Nicolas pointed out.

    The position size in fractions of a contract has to be coded with exactly 2 decimals (or less), otherwise the order will be rejected by IG.

    If your code calculates position size by some other algorithm (from the previous strategy profit, for example), you have to make sure that the position size turned over to IG has only 2 decimals.

    For example, the following code ensures that you will have only 2 decimals maximum for the position size :

     

    n = 1 + (strategyprofit / 145)

    n = round(n * 100)

    n = n / 100

    buy n contracts at market

     

    This will avoid to say “buy 1.35768 contracts at market”, but will instead send “buy 1.36 contracts at market” to IG, which will be OK.

     

    4 users thanked author for this post.
    #41779

    Thank you, that’s very helpful.

    Two questions –

    1. How do I get the new code, I can’t see how to update.
    2. When I have an instrument autotrading according to a trading system, I may want to change a parameter in the system or the code itself (as here, with the decimals amendment), but I can’t find a way to do that without the laborious process of deleting the system from AutoTrading, then adding back after making the alteration to the system. Is it possible to amend the system without needing to do that?  If you’ve got lots of instruments trading, it takes a lot of time changing them all.
    #41792
    1. You have nothing to do, except change yourself all your strategies codes 🙂
    2. Once a strategy had been launched, there is no other way than stop it, change its code and relaunch it. Codes must be compiled before their launch on market/execution server, that’s why you can’t change them.
    #41810

    OK, thank you that’s clear.

    Yes the code works, when I backtest I get position sizes to 2 decimal places, but when I dummy trade position sizes are whole numbers (1 or 10 so far today)?

    #41817

    You mean manual trading?

    #41818

    No, sorry, I mean when I’m using ProOrder AutoTrading to trade a demo spreadbet account on IG Index.

    #41819

    Real and demo accounts with IG should have now this possibility. Are you sure you have changed your code accordingly to trade lot with decimals?

    #41879

    Nicolas,  you’re correct!  I’m really sorry, I backtested using the code with the rounding which worked properly, then I looked at current trades, which are using my old code without the rounding.  I’m sure it’ll be OK now, my apologies.

    #42234

    I tried the:

    = 1 + (strategyprofit / 145)

    n = round(n * 100)

    n = n / 100

    buy n contracts at market

    in a strategy that I was back-testing and it appeared to not sell out all of the positions bought. It was a BUY only strategy and the detailed report showed short trades when none had been taken and a time in the market of over 90% when in fact it should have been about 5%. I could see on the positions graph a fine line of pips still open that should have been sold. Any ideas why this should happen as I don’t want to add it to a live strategy until I know it will close all of a position.

     

    #42238

    @Vonasi
    If you “SELL AT MARKET”, all your positions should be closed. Is it the instruction you have used in your code?

    #42246

    Yes that was the instruction that I used as far as I recall (testing lots of ideas at the moment so I can’t even recall which strategy it was that I noticed this on!)  I’m in the middle of a walk forward at the moment but once that has finished I’ll modify this strategy and see if it does it again.

    Thinking about it it may have been a strategy with cumulative positions that showed the problem.

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

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