Need help with OrderSend() - page 2 12 New comment Gopalakrishna R 2013.07.02 13:48 #11 RaptorUK: Check the Symbol information first to see if the Filling mode you are trying to use is valid or not . . . https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_filling_modeI checked some other parameters too using example given. It seems all is well except my code. 2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Take Profit orders are allowed2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Stop Loss orders are allowed2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Buy Stop Limit and Sell Stop Limit orders are allowed2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Buy Stop and Sell Stop orders are allowed2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Buy Limit and Sell Limit orders are allowed2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Market orders are allowed (price specification is not required)2013.07.02 17:15:43 test2 (EURUSD,H1) ORDER_FILLING_RETURN is Allowed2013.07.02 17:15:43 test2 (EURUSD,H1) ORDER_FILLING_IOC is Allowed2013.07.02 17:15:43 test2 (EURUSD,H1) ORDER_FILLING_FOK is Allowedvoid OnTick() { //--- string symbol = _Symbol; if(IsFillingTypeAllowed(symbol,ORDER_FILLING_FOK)) Print("ORDER_FILLING_FOK is Allowed"); if(IsFillingTypeAllowed(symbol,ORDER_FILLING_IOC)) Print("ORDER_FILLING_IOC is Allowed"); if(IsFillingTypeAllowed(symbol,ORDER_FILLING_RETURN)) Print("ORDER_FILLING_RETURN is Allowed"); } //+------------------------------------------------------------------+ bool IsFillingTypeAllowed(string symbol,int fill_type) { int filling=(int)SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE); return((filling & fill_type)==fill_type); } MetaTrader 4 Build 600 Help needed with Exper What's wrong with this Gopalakrishna R 2013.07.02 14:23 #12 RaptorUK: Check the Symbol information first to see if the Filling mode you are trying to use is valid or not . . . https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_filling_mode Thanks friend. Finally it worked after changing type_filling from ORDER_FILLING_RETURN to ORDER_FILLING_IOC. But I dont know the reason why. Alain Verleyen 2013.07.02 14:51 #13 krishna_gopal_2: Thanks friend. Finally it worked after changing type_filling from ORDER_FILLING_RETURN to ORDER_FILLING_IOC. But I dont know the reason why.Maybe a wrong information from the broker for SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE)For me it works with the 3 filling mode. 12 New comment
Check the Symbol information first to see if the Filling mode you are trying to use is valid or not . . . https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_filling_mode
I checked some other parameters too using example given. It seems all is well except my code.
2013.07.02 17:10:06 test2 (EURUSD,H1) EURUSD: Take Profit orders are allowedCheck the Symbol information first to see if the Filling mode you are trying to use is valid or not . . . https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_filling_mode
Thanks friend. Finally it worked after changing type_filling from ORDER_FILLING_RETURN to ORDER_FILLING_IOC. But I dont know the reason why.
For me it works with the 3 filling mode.