Hello, is everything ok? I decided not to use these methods, I developed the method below to check if the asset is up for auction, do you agree that it will work?
bool IsAuction(string symbol) { double bid = SymbolInfoDouble(symbol, SYMBOL_BID); double ask = SymbolInfoDouble(symbol, SYMBOL_ASK); bool isSpreadNegative = bid > ask; bool isNoVolume = true; MqlTick ticks[]; int count = CopyTicks(symbol, ticks, COPY_TICKS_ALL, 0, 1); if (count > 0) isNoVolume = false; if (isSpreadNegative || isNoVolume) return true; return false; }
Hello, is everything ok? I decided not to use these methods, I developed the method below to check if the asset is up for auction, do you agree that it will work?
Generally speaking, I don't know. AFAICT, the given form of CopyTicks will always return latest available tick, so count will be 1. Also I'm not sure that spread should be negative during auction, it's more often to see very large but positive spread, so probably checking against SYMBOL_BIDLOW/SYMBOL_ASKHIGH/SYMBOL_SESSION_PRICE_LIMIT_MIN/SYMBOL_SESSION_PRICE_LIMIT_MAX could be helpful as well.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everything is fine? I need to make changes so that my robot operates only within the open market, so that it does not operate in auctions and after the closing call, I saw that there was nothing native for this, so I developed the following methods that run every tick:
Is this approach correct, and is it the best one to follow? Thanks in advance!