Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1421
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
Tell me where you can download MT4 1320
The OBV indicator in mt5 has no possibility to select the type of price calculation
In mt4 this option is available.
Why?
In fact, OBV is calculated as the sum of all the volume on the entire history, where the candle is down the volume is "negative"
So why in mt4 is it possible to select the price type for the indicator calculation? if it is not involved in the calculation
There is part of the code to calculate the separate number of buy and sell orders. (b - buy orders, s - sell orders)
Then I want to write a condition whereby if a new order is opened or an existing order is closed. I.e. we need to compare the number of orders opened earlier and the number of subsequent changes, but I do not know how to write this in the code. How do I save changes in the number of orders? Please help.
The OBV indicator in mt5 has no possibility to select the type of price calculation
In mt4 this option is available.
Why?
In fact, OBV is calculated as the sum of all volume on the whole history, where the candle is down the volume is "negative"
So why is it possible to select the price type for the indicator during its calculation in mt4? if it is not involved in the calculation
A good question is half the answer.
There is part of the code to calculate a separate number of buy and sell orders.
And there is a place to insert it)
A well-defined question contains half the answer.
And there's somewhere to put it).
Then I will repeat the question.
There is a part of code to calculate separate number of buy and sell orders. (b - buy orders, s - sell orders)
Then I have written a condition whereby, if a new order is opened or an existing order is closed, the next action is triggered. I.e. we have to compare the number of orders opened earlier and the number of subsequent changes, but I do not know how to write this in the code. How do I save changes in the number of orders? Please help.
If anything, you have to do it statically, otherwise it resets.
I usually make flags global. Of course in the body of the function will redeclare and Static is needed. But why nobody noticed that curly brackets are missing)))) print & assignment should be in brackets)
And without static of course it will print on every function call sinceprintsimbol="" will become ZERO and symbol will be assigned the current value)
Then I will repeat the question.
There is a part of code to calculate separate number of buy and sell orders. (b - buy orders, s - sell orders)
Then I have written a condition whereby, if a new order is opened or an existing order is closed, the action is passed on. I.e. we have to compare the number of orders opened earlier and the number of subsequent changes, but I do not know how to write this in the code. How do I save changes in the number of orders? Please help.
I would try to do this