Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 680
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
I can't download the tool into the terminal, what should I do?
So, if people have bought an indy, what is your connection to it?
I have it roughly like this:
In the input parameters block:
MaxLossBalanceBlock - maximal drawdown of balance in % for all symbols, at which orders on the current symbol will be opened (does not affect the averaging orders), 0 - not used.
It is not used in the function of searching for signals to enter:
But you will have to adapt it to your code yourself, I have very little free time.
If there are open positions, the drawdown should be calculated based on equity, not on the balance. The balance may be zero or even less than zero if the equity is positive. How would you calculate it?
And if your balance is a billion, but your equity is around the margin stake, what then?
I wrote a long time ago and in a hurry, but nobody has offered any other help (code example) so far. That is why it is what it is.
The question was:
It's called nonsense :)
And so:"only the averaging ones will open" - no, they won't - there is no margin.
How do I calculate the lot for dynamic T/P, so that the profit in the depo currency. is always equal to N units?
Money - earned/lost
Stopplos - in broker points
Tick - SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE);
From here you can spin it as you want:
Staples=Money/(Lot*Tick)
Money=Lot*Stopplos*Tick
When I apply an indicator to "First Indicator's Data", how do I know which buffer is taken for calculations?
only search the forum and "First Indicator's Data" articleshttps://www.mql5.com/ru/search#!keyword=First%20Indicator's%20Data
and then check it yourself
HH: not a very popular way of calculation in indicators, usually they don't bother - if you want to calculate an indicator programmatically, you just look in the "Data window" or in the indicator source, find the needed buffers and use them in calling your indicator later
Thank you.
How do I expand the formula to know what the profit in the depo currency will be when the Take Profit is reached ?
How do I expand the formula to know what the profit in the depo currency will be when the Take Profit is reached ?
Probably like this, for sell:
profit=NormalizeDouble((OrderOpenPrice()-Ask)*MarketInfo(_Symbol,MODE_TICKVALUE)*lot/Point,2);
for a Bid-based purchase, i.e. ( Bid -OrderOpenPrice())
probably like this, for selling:
profit=NormalizeDouble((OrderOpenPrice()-Ask)*MarketInfo(_Symbol,MODE_TICKVALUE)*lot/Point,2);
to buy by Bid, i.e. ( Bid -OrderOpenPrice())
This solution does not take into account commissions and swaps. The points seem to be in profit, but with costs - losses.
We need to operate with:Lot -> Money -> Distance, and the cost of the tick