Dynamic Position size

Forums ProRealTime English forum ProOrder support Dynamic Position size

Viewing 9 posts - 1 through 9 (of 9 total)
  • #53880

    Having built many systems that use a flat contract size ive now started to look at building systems that remain fully invested and have hit a stumbling block  . So far i have come up with what i think is the correct code to acheive this but i need some help identifying the right terms that PRT will identify
    My code thus far would look like this

    //automated contract number
    n = INITIALCAPITAL/close
    w = STRATEGYPROFIT
    c = Close x = n + w/c

    ‘x’ will be the number of shares/contracts traded  . Strategyprofit is recognized fine but i am yet to find the correct term for initial capital thats identified correctly by PRT

    Appreciate any help  Regards and thanks Pete

    #53881

     

      The other alternative is to make  x = TOTALEQUITY/close   but once again im struggling to find the term that PRT uses  . I’d prefer to use the first code sample if possible but either way id love to know the terms for both initialcapital and totalequity

    1 user thanked author for this post.
    #53882
    Sorry how messy this all looks , please forgive me as im new to posting code in here .. Thanks 
     
     
     

    Having built many systems that use a flat contract size ive now started to look at building systems that remain fully invested and have hit a stumbling block . So far i have come up with what i think is the correct code to acheive this but i need some help identifying the right terms that PRT will identify My code thus far would look like this //automated contract number n = INITIALCAPITAL/close w = STRATEGYPROFIT c = Close x = n + w/c ‘x’ will be the number of shares/contracts traded . Strategyprofit is recognized fine but i am yet to find the correct term for initial capital thats identified correctly by PRT Appreciate any help Regards and thanks Pete

     

     

    #53918

    I must be missing something.  If your variable INITIALCAPITAL is what it seems to be i.e. your initial starting capital then you know that number so you can just assign it to the variable e.g. INITIALCAPITAL = 5000?

    #53919

    I must be missing something. If your variable INITIALCAPITAL is what it seems to be i.e. your initial starting capital then you know that number so you can just assign it to the variable e.g. INITIALCAPITAL = 5000?

    I realise that and thats what i have been doing but due to the fact i do a lot of testing and use a lot of different testing on varying %ages of capital Id like something that does the job ‘ automatically ‘ if possible .  Thanks for pointing out what i already knew  …   

    #53949

    Hi

     

    Please find a code for position sizing for 1% risk of initial and 3% of risk of market money (=strategyprofit)

     

    There is an interesting book on position sizing

    Van Tharp’s : Defenitive guide to position sizing

    4 users thanked author for this post.
    #53960

    If you want to manage % stop loss of position with 1% of your equity risk

     

    4 users thanked author for this post.
    #53975

    Thanks Yannick appreciate that  , will definitely use that  

    #53991

    Hi Yannick,  the first example from Van Tharp looks great, the second one doesn’t look right to me for setting the stop loss.  If the intention is to place the stop loss to allow no more than 2% of your equity to be at risk then it should be based on 2% of the equity in a similar way to the way the position size is calculated.  The attachments show 2 very different outcomes for 2 ways of setting the stop loss  and you can see that %ploss is related to the size of the total position size, the HS is at about 29000 currently so 29000/50 = 580 is about the level of stop loss being set.

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

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