Define position size as percentage of account

Forums ProRealTime English forum ProOrder support Define position size as percentage of account

Viewing 6 posts - 1 through 6 (of 6 total)
  • #131990

    Hi all,

    I was wondering how to define my contract size to be 0.5 % of my account size, for example my stop loss I’d like to keep defined at 100 pips and then the contract size would be defined as a function of account size and pip value.
    I found the “% max risk exposure” in the ProBacktest manual, but am not sure if this is along the right lines, could anyone please help?

    Thanks!

    #132105

    This small snippet will calculate the lot size according to your account and risk in percentage.

     

    #132163

    Many thanks Nicholas! I’ll give this a try.

    #132172

    I have also noticed that my live trade was closed on Friay night. This was not supposed to happen; it was nowhere near either the stop loss or take profit, could anyone please advise as to how I could stop this from happening?

    I saw code with ‘lasttime’ and ‘opening time’ stipulated (https://www.prorealcode.com/topic/hold-over-the-weekend-or-not-test/); could these in some ways be used to let open trades carry on over the weekends?

    Thanks again.

    #132174

    Trades will only close if you have instructions in your code to do so. Possibly your broker expanded the spread over the weekend that meant that one of your stop prices was met and the trade closed. If you believe that one of your trades was closed when it should not have been then you should contact your broker and ask them why it closed.

    #132176

    Thanks for the response Vonasi, it was a short trade and there was a gap down over the weekend, but this would still not have resulted in the TP being hit, I’ll ask the broker.

    Thanks again,

    Badar.

     

     

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

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