Trading with decimal quantities possible on ProOrder Live!

Viewing 15 posts - 31 through 45 (of 52 total)
  • Author
    Posts
  • #49314 quote
    maxpro
    Participant
    New

    Thank you Eric for that link.  I am really surprised that IG and PRT haven’t got this included in their manual for ProOrder programming, but at least there are some very experienced people here to help.    Thank you very much.

    I note that JohnMBradford’s comment above shows that others are using it.    It hadn’t quite clicked with me that his comment showed a programming example.   I’ll have to investigate further and see if there is any further information in the manual.

    #49377 quote
    JohnMBradford
    Participant
    Junior

    I didn’t find anything in the manual when I was puzzling over this, but I looked only because things weren’t happening as I expected.  If things had worked properly the first time, I wouldn’t have thought that dealing in decimals would have necessarily needed to be in the manual.

    On a slightly different note for those who deal through IG Index, it’s annoying that IG’s test system sometimes has minimum bet sizes that are different from live trades.

    I’ve also found that IG’s treatment of an order generated by PRT which has a bet size below IG’s minimum (because my risk calculation required that in order to trade) for some securities places the trade at the minimum but for others rejects the trade on the grounds that my bet size is below the minimum.  This is presumably a bug, but no-one seems too bothered about fixing it.

    #49471 quote
    Nicolas
    Keymaster
    Master

    but no-one seems too bothered about fixing it.

    Fixed!

    minimumsize = 10
    
    if buycondition then 
     buy max(minimumsize,myCalculatedSize) perpoint at market 
    endif

    Note that the variable “myCalculatedSize” is the result of your own betsize calculation (for which I do not know anything)

    #49853 quote
    JohnMBradford
    Participant
    Junior

    Thank you, yes, I appreciate that I can amend my code to overcome the problem.  My point is more that there appear to be several bugs in the system that no-one appears to be addressing, which is a worry.

    #52793 quote
    Leo
    Participant
    Veteran

    Hi, Nicolas

    It will be great to close also partial positions. I know that you are a consultant to Prorealtime. That will be many of us happy if you send this suggestion.

    kind Regards

    #53639 quote
    AutoStrategist
    Participant
    Veteran

    @Nicolas Wanted to make sure specifying a decimal amount worked before doing it for real, it does indeed work using  1.5 GBP per point on the Dax with a simple test app.

    However I was forced to put in an integer value (2 in this case)  for the maximum position size which doesn’t seem correct?  See attached. 

    PRTDecimal.jpg PRTDecimal.jpg
    #53646 quote
    JohnMBradford
    Participant
    Junior

    Yes decimals do work, up to two decimal places max

    Capture-4.png Capture-4.png
    #53663 quote
    AutoStrategist
    Participant
    Veteran

    Thanks John,  I should have asked first then I wouldn’t have wasted money on a random losing test bet on the Dax :(.  Looks like you are trading a really wide universe of markets and ETFs, I will have to widen my horizon I have stuck to index DFBs, Major FX pairs and Brent Crude up to now.

    #53832 quote
    JohnMBradford
    Participant
    Junior

    That extract was in the test system, but it’s far from foolproof (as yet).  I trade whatever market appears to work in my system.  The market itself doesn’t matter.

    #63954 quote
    GraHal
    Participant
    Master
    Seems weird … I can open a spreadbet manual trade at 0.5 perpoint on DJI, but with either of below in the code then trades open at 1 perpoint. Anybody else get similar or any thoughts please? Thanks GraHal
    Buy 0.50 Contracts at Market
    Buy 0.50 perpoint at Market
    #64039 quote
    Eric
    Participant
    Master
    min size is still 1 in proorder? dont know why?
    #64043 quote
    GraHal
    Participant
    Master
    Thank you Eric, I’ll query / ask IG what the rationale is behind different minimum for manual and Algos. I’ve put it on the IG Community, hoping to get a better response as it is IG moderated etc. https://community.ig.com/t5/Platform-and-App-Technical/PRT-Pro-Order-Algo-Minimum-on-DJI-Dow/m-p/23135#M877
    #64120 quote
    GraHal
    Participant
    Master
    Nobody has replied on the IG Community but lo and behold the DJI Algo took a 0.5 Contracts Lot side about 10 minutes ago!!!!!!! One Success … whooopppeeedddooo!!! GraHal
    #64207 quote
    Alberto Lucchese
    Participant
    Average
    Hi, does this work for backtesting? I’ve tried the code below and it does not triggers any buys, if i replace the MaxNumOfContracts in the BUY order for 1 it works, if i use 1.2 or 1.5 instead, it will still use 1. So i have two problems here:
    1. I don’t know why the code won’t consider valid the value of MaxNumOfContracts inside the BUY ORDER
    2. when manually entering decimals, it will round down (remember this is backtesting)
    InitialCash=20000
    Equity=InitialCash+StrategyProfit
    RiskPerTrade=0.01
    MaxRisk=Equity*RiskPerTrade
    ContractSize=close*pipvalue
    ContractRisk=ContractSize*RiskPerTRade
    MaxNumOfContracts=max((round(MaxRisk/ContractRisk*100)/100),1)
    /////then the buy
    IF NOT LongOnMarket AND FilterCondition1 AND FilterCondition2 AND BuyCondition1 AND BuyCondition2 THEN
    BUY MaxNumOfContracts CONTRACTS AT MARKET
    ENDIF
    Thanks!
    #64345 quote
    GraHal
    Participant
    Master
    My Algo on DJI has repeatedly executed orders at 0.5 Lots, but the window below will only accept a max at 1 Lot.
    PRT-10.jpg PRT-10.jpg
Viewing 15 posts - 31 through 45 (of 52 total)
  • You must be logged in to reply to this topic.

Trading with decimal quantities possible on ProOrder Live!


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Nicolas @nicolas Keymaster
Summary

This topic contains 51 replies,
has 3 voices, and was last updated by T-rader
2 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/04/2017
Status: Active
Attachments: 4 files
Logo Logo
Loading...