Variable Equal to platform balance

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #184591 quote
    Ash12222222Ash12222222
    Participant
    New

    Hi All,

    I am new to the platform and new to these boards.  I was wondering if any one can help me?  I have programmed a money management system but I am having to fix in the amount in the variable to say 1000. e.g. Capital = 1000.  Is there a way of linking the Capityal variable to the account balance so that it not limited to 1000.

     

    Cheers

    #184595 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    No, you have to change the code whenever you add/withdraw money from your account.

    If you mean adjusting your Capital with profits/losses, then you simply have to add STRATEGYPROFIT (the total profit/loss incurred whenever a trade closes) to your CAPITAL, which is fixed. Their sum is your Equity that you can use to manage your risk and position size.

    #184597 quote
    Ash12222222Ash12222222
    Participant
    New

    Thanks you very much for your response.

     

    Capital = 1000
    Risk = 0.04
    PV = Max(PointValue,0.000000001)
    PS = Max(Pipsize,0.000000001)
    equity = Capital + StrategyProfit
    maxrisk = round(equity*Risk)

     

    this is my code, my be a bit basic however I dont want the hard coded 1000K I want that to equaly the new balance after the trade ever made a loss or profit for example.

     

    Trade 1 = 1000 Capotal

    Trade 1 loses 50 therefore capital is 950

    I am therefore trying to make my new capital amoutn equal to 950 without having to manually change the code.

     

    Cheers again

    #184602 quote
    Ash12222222Ash12222222
    Participant
    New

    Sorry to simplifiy it i mean across all my strategys so i need the amount in the account.

     

    Cheers

    #184613 quote
    JSJS
    Participant
    Master

    Strategy’s can’t communicate with each other and there is no link to your account possible.

    “Equity = Capital + StrategyProfit” is correct and when you make a profit (StrategyProfit) then this amount will be added to your Capital (subtracted when it is a loss) but only for that strategy.

    #184615 quote
    JSJS
    Participant
    Master

    Edit: “will be added to your Equity” (your Capital is fixed)

    #184616 quote
    Ash12222222Ash12222222
    Participant
    New

    Great thanks you

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Variable Equal to platform balance


General Trading: Market Analysis & Manual Trading

New Reply
Author
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Ash12222222Ash12222222
4 years, 8 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 01/05/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...