[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 7

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Explain please what is a cumulative trade? For example, there is a Sell position minus 100 pips, the TS tries to open a Buy position, is there such a possibility? Or what "aggregate" will be left if the CU does open a BAY position?
If your long trade with the same lot, it will overlap your short one. So, if you think in terms of fours, your stoploss is triggered.
How to calculate the maximum differencebetween AccountEquity()and AccountBalance() in the history ?
Thank you.
How to calculate the maximum difference between AccountEquity() and AccountBalance() in the history ?
Thank you.
AccountBalance(M1) = BeginBalance + Profit (on closed trades);
AccountEquity(M1) = AccountBalance(M1) + Profit (on open trades);
And run through the BeginBalance.
MaxProsadka[0] = MathMax (MaxProsadka[0], AccountEquity(M1) - AccountBalance(M1);
MaxProsadka[1] = MathMin (MaxProsadka[1], AccountEquity(M1) - AccountBalance(M1));
Something like this.
I honestly wish you good luck on this thorny path.
Kim wrote his functions a long time ago, there were no DCs working with 5 digits then, and therefore these functions will not ALWAYS work correctly, for example these lines:
Second line can be simply removed at all, to avoid "stressing" the code or check for exception of error ZERO_DIVIDE can be written like this:
It would be more elegant to write Point value into global EA variable in init() and take it from there.
Yes... I noticed that a long time ago, but never got around to it.
I'll fix it. THANK YOU.
Suppose I have open orders "buy1", "buy2", "buy3" and pending orders "buy4", "buy5", "buy6". I can not write a script that would close all these orders when one of them is breaking through Take-Profit.
Please help me as a beginner. I am very thankful for the replies.
Thank you all very much,
The thing is I need a simple example of calculating the maximum distance between the opening price and the price extremums during the lifetime of each order. This I can't figure out how to do.