Thank you for suggesting smart calculator for position planning.
For real-time drawdown managment of different lots, a dynamic breakeven Line is needed for the present trade cycle.
Since pips/dollars will be difficult to implement it will be useful if you can just print on the chart text average entry and stoploss in PIPS (not $) along with lots statistics.
Most of analytical statistics are now freely available sites like myfxbook and fxblue, but the trades needs a dynamic Breakeven Line for the present trade cyle.
You can generalise current floating DD on 1 pair in a varying lot cycle as follows in Excel:
[SUM [(Trade1_lotsize*DD_pips*$perlot + Trade2_lotsize*DD_pips*$perlot+ ... + TradeN_lotsize*DD_pips*$perlot)]]/(Initial _Account_Balance)*100
Where Trade 1 is the first trade in the Varying Lots cycle and trade N is the very last trade in the same trade cycle.
The following calculation gives the current cycle $DD:
Current Varying Lot cycle DD ($) = SUM [(Trade1_lotsize*DD_pips*$perlot + Trade2_lotsize*DD_pips*$perlot+ ... + TradeN_lotsize*DD_pips*$perlot)].
Ah, I understand, it's a sum of MAE of all positions currently held, I will think on this suggestion, it may require additional formalization points...
I have been using the Equity-monitor for some time but recently my broker had changed the server and all the forex pairs and instruments comes with a suffix of -5 (for example EURUSD-5) and the indicator stopped working.
Is there anything that can be done in the code to fix this?
Hello, please look into parameters FX_prefix and FX_postfix, you may set appropriate broker symbols using it
How can we know what is the lowest margin level % the account has ever reached ?
Hi smf, actually margin shown estimated levels, you could use option show_margin to see additional margin chart to seek its minimum
I have noticed that if I put more than 1 comment in I get no results, it only seems to recognize or work when only 1 comment is inserted, is there the possibility to add this function to see multiple comments(systems or EA's).
Great tool by the way, appreciate thework done
Yes, currently this is a basic filter for finding a substring inside a string (fragment inside comments) but if 2 or more comments have a common part they could be filtered by specifying that part (substring).
I really appreciate your tool that it's very useful in my personal studies
I found an issue in the margin calculation of hedged positions in CalculateHistoryBars. Metatrader compensates margin of hedged positions but your tool simply sums the margin taken by single trades without considering they are hedged
long 1 lot EURUSD --> margin 227 USD on MT4 confirmed by your tool --> OK
if I add short 1 lot EURUSD margin on MT4 is 0 USD but your tool simply makes the sum 454 USD --> not OK
could you please fix this little bug considering hedged positions in the margin calculation?
thank you very much in advance
Hi Francesco, thanks for your kind reply,
hedged positions currently are not taken into account and all are being summed as is,
because it would require code refactoring for history orders,
for example position A and hedging position B could be opened in different times,
so that only intersection of periods holding should be accounted for hedge, leaving "tails" without hedge,
also brokers could change hedging margin policy, so it's not so easy to calculate all correctly,
anyway i'll try to think it all over, what could be done...