How to define positionsize out of equity

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #147989 quote
    sebb9707
    Participant
    Junior

    Hi,

    I would like to take a positionsize of 1% out of total equity in every trade, how would a code look to define that in a strategy?

    How would the code look if the system takes a positionsize of 1% of initial capital?

    Best regards,
    Sebastian B

    #148030 quote
    robertogozzi
    Moderator
    Master

    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.

    Thank you 🙂

    #148080 quote
    TempusFugit
    Participant
    Veteran
    CAPITAL = XXXXXXXX//Your initial Capital
    OPPERC = 1 //Percent of your equity you want to use in each trade
    POSITIONSIZE = (CAPITAL+STRATEGYPROFIT)*(OPPERC/100)/CLOSE
    
    IF.....(condiciones de compra)
    BUY POSITIONSIZE CONTRACT AT MARKET
    ENDIF

    Please take into consideration:

    • If the active is in a different currency that your “CAPITAL” it won´t work properly
    • The Equity (CAPITAL+STRATEGYPROFIT) is calculated for each system you operate, I don´t think is possible to do it for your whole equity from all your systems

    Good luck

    sebb9707 thanked this post
    #148083 quote
    sebb9707
    Participant
    Junior

    Thanks for the help!

    Best regards,
    Sebastian B

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

How to define positionsize out of equity


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
sebb9707 @sebb9707 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by sebb9707
5 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/21/2020
Status: Active
Attachments: No files
Logo Logo
Loading...