Questions from Beginners MQL5 MT5 MetaTrader 5 - page 552
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
If you need rsi and stochastic in one indicator, it can be implemented by means of mql language. Contact the freelance service.
The condition for breaking through the level.
e.g. closing price of a candlestick
double Uroven; - level
if (Close[2]<Uroven && Close[1]>=Uroven) from the bottom upwards
if (Close[2]>Uroven && Close[1]<=Uroven) from top to bottom.
Hello, ran into this problem.
There is a condition in the program: if a variable (in which profit of certain orders is calculated) is smaller than the expression from several other variables, several functions will be executed next.
I will not describe at once exactly what and how it is calculated as it would be too much. Perhaps, the answer will be very simple because I do not know it:)
So, when executing the program this condition turns out to be true, when in fact the first variable is much larger than the other one (for example, I was outputting values - 146.3412 and 0.41 in the tester).
All variables in this condition are of type double and separately are calculated correctly.
Can you tell me what it may be related to?
Hello, ran into this problem.
There is a condition in the program: if a variable (in which profit of certain orders is calculated) is smaller than the expression from several other variables, several functions will be executed next.
I will not describe at once exactly what and how it is calculated as it would be too much. Maybe, the answer will be very simple because I do not know it:)
So, when executing the program this condition turns out to be true, when in fact the first variable is much larger than the other one (for example, I was outputting values - 146.3412 and 0.41 in the tester).
All variables in this condition are of type double and separately are calculated correctly.
Can you tell me what it may be related to?
The solution really lies on the surface - go here:Telepath Club
Prerequisite:
ProfitSellDBL is calculated here
Profit_Upgr = 0.01
Tral_Start__Upgr is equated to an external variable of int type and equals to 5.
Tral_Size__Upgr is similarly equal to 4
TV - tick value, =10
SumLotSellDBL = 0.04
The condition for breaking through the level.
e.g. closing price of a candlestick
double Uroven; - level
if (Close[2]<Uroven && Close[1]>=Uroven) from the bottom upwards
if (Close[2]>Uroven && Close[1]<=Uroven) from top to bottom.
Sorry, it does not work. I will describe it in a picture. The red broken line is an indicator, the blue lines are levels.
Condition for opening Buy: when the indicator crosses any level from bottom to top.
Condition for closing Buy (simultaneously open Sell): when the indicator crosses any level from top to bottom, except the one where the order was opened.
Sorry, I must be boring you already.
Prerequisite:
ProfitSellDBL is calculated here
Profit_Upgr = 0.01
Tral_Start__Upgr is equated to an external variable of int type and equals to 5.
Tral_Size__Upgr is similarly equal to 4
TV - tick value, =10
SumLotSellDBL = 0.04
Sorry, it doesn't work. I'll describe it in a picture. The red broken line is the indicator, the blue lines are the levels.
Condition to open Buy: when the indicator crosses any level from bottom to top.
Condition for closing Buy (simultaneously open Sell): when the indicator crosses any level from top to bottom, except the one at which the order was opened.
Sorry, I must be boring you already.
Sorry, it doesn't work. I'll describe it in a picture. The red broken line is the indicator, the blue lines are the levels.
Condition to open Buy: when the indicator crosses any level from bottom to top.
Condition for closing Buy (simultaneously open Sell): when the indicator crosses any level from top to bottom, except the one at which the order was opened.
Sorry, I must be boring you already.
Instead of Close[2], put the indicator value on the second bar (for example iRSI(.......,2) ), and instead of Close[1] put the indicator value on the first bar. And uroven is the value of the level.
And the rest you have already been told above.