Hello Folks,
I am stuck with something which seems to be a very simple task - who can help me out?
Let's assume multiple positions will be opened with an Account Starting Balance of 1000:
With the "knowledge from the above "MaxDDCurrentRound" I want to get "MaxGainFromHighestDDthisRd". This is where I am stuck.
I am stuck with something which seems to be a very simple task - who can help me out?
Let's assume multiple positions will be opened with an Account Starting Balance of 1000:
- The drawdonwn of the open trades reduces balance to 100 (Drawdown of 900) before the
- Account balance again rises to 600 ("profit" from Highest Drawdown = 500).
How do I code to get the above mentioned 500 Profit (gain) from Highest Drawdown)?
What I did so far:
Inserted Code
if(AccoutEquityPriorCurrentRound>AccountEquity()) { if(MaxDDCurrentRound < AccoutEquityPriorCurrentRound-AccountEquity()) { MaxDDCurrentRound = AccoutEquityPriorCurrentRound-AccountEquity(); //MaxDDCurrentRound is always zero or higher (positive number). }
With the "knowledge from the above "MaxDDCurrentRound" I want to get "MaxGainFromHighestDDthisRd". This is where I am stuck.
Inserted Code
if(MaxGainFromHighestDDthisRd < TheValueWhichNeedsToBeCalculatedHere)) { MaxGainFromHighestDDthisRd = TheValueWhichWasCalculatedRightAboveFromHere); }