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
Why are you doing this at all?
I compare two indicators on exchange instruments:
I compare two indicators on exchange instruments:
It is clear, but what are these two charts for?
What are you going to do with them?
This is understandable, but what are these two charts for?
What are YOU going to do with them?
There are two answers here (you can consider them in the concept of AND, OR, OR OR- generally to your liking):
There are two answers here (you can consider them in the concept of AND, OR, OR OR- generally to your liking):
By the time you get your data in the OnCalculate function, you will be out of your trousers!
I could not capture more as the indicator readings are reset if the connection is interrupted:
Screenshots of MetaTrader trading platform
RTS-9.16, M1, 2016.09.12
JSC ''Brokerage House ''OTKRYTIE'', MetaTrader 5, Real
Correlation of RTS-9.16 trend direction, total volume of open positions and difference between the volume of buy orders at the moment and the volume of sell orders at the moment
For the Open Interest indicator I introduced a small modification: now, after the first launch, if prev_calculate==0, the indicator will not reinitialize its indicator buffers. What do I get: for example, you attach indicator to a chart, the indicator works for some time and suddenly prev_calculate==0 (maybe there was a connection failure, or something happened with the history) - in this case, the indicator will not reinitialize its indicator buffers and it will continue working as nothing happened.
Implementation:
in the area of declaration of global variables of the program there is a variable"StartDate":
then at the first start (at prev_calculated==0) value of "StartDate" variable is checked: if its value is less than D'2015.01.01 00:00' - this is the first indicator start, and "StartDate" variable is assigned with the last known server time
otherwise it simply returns "rates_total".
Hello again! I have another question about using SYMBOL_SESSION_SELL_ORDERS_VOLUME and SYMBOL_SESSION_INTEREST constants. When using the indicator posted in this thread, the data on these constants are plunged, obviously to test their use on the history you should create an Expert Advisor. When receiving these constants via SymbolInfoDouble(Symbol(),SYMBOL_SESSION_BUY_ORDERS_VOLUME) not in OnCalculate() the output is zero.
Personally I want to take a simple way without complicating the code too much. Can it be obtained only for the indicator and respectively only in OnCalculate(), and it cannot be obtained on the history, since the data can be obtained only for the current bar?
Please answer in this topic and do not move the message, as it is impossible to find the answer later, especially since the question is on topic.