// working function of the Expert Advisor int start() { // positions are opened once on each bar if (!IsNewBar()) { return (0); } // close all open positions TradeClosePositions(DIRECTION_UP); TradeClosePositions(DIRECTION_DOWN); // update the model state if (prediction!=DIRECTION_NO...
(; i<total; i++) { if(!::OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) continue; ENUM_ORDER_TYPE order_type=(ENUM_ORDER_TYPE)::OrderType(); //--- Closed positions if(order_type<ORDER_TYPE_BUY_LIMIT) { CHistoryOrder *order=new CHistoryOrder(::OrderTicket()); if(order==NULL) ...
Allowed only short positions SymbolInfoInteger SYMBOL_TRADE_STOPS_LEVEL Minimal indention in points from the current close price to place Stop orders SymbolInfoInteger SYMBOL_TRADE_TICK_SIZE Minimal price change SymbolInfoDouble SYMBOL_TRADE_TICK_VALUE Value of SYMBOL_TRADE_TICK_VALUE_PROFIT ...
ERR_LONG_POSITIONS_ONLY_ALLOWED 140 只允许看涨仓位。 ERR_TOO_MANY_REQUESTS 141 过多请求。 ERR_TRADE_MODIFY_DENIED 145 因为过于接近市场,修改否定。 ERR_TRADE_CONTEXT_BUSY 146 交易文本已满。 ERR_TRADE_EXPIRATION_DENIED 147 时间周期被经纪否定。 ERR_TRADE_TOO_MANY_ORDERS 148 开单和挂单总数已被...
(2,LipsShift); // first positions skipped when drawing SetIndexDrawBegin(0,JawsShift+JawsPeriod); SetIndexDrawBegin(1,TeethShift+TeethPeriod); SetIndexDrawBegin(2,LipsShift+LipsPeriod); // 3 indicator buffers mapping SetIndexBuffer(0,ExtBlueBuffer); SetIndexBuffer(1,ExtRedBuffer); SetIndexBuffer...
This service periodically checks swaps for predefined symbols and saves detected changes into CSV-files for further analysis and potential replay (not implemented here). Also it monitors and alerts swap changes of existing positions. Economic Calendar CSV ...
//--- first positions skipped when drawing SetIndexDrawBegin(0,InpJawsShift+InpJawsPeriod); SetIndexDrawBegin(1,InpTeethShift+InpTeethPeriod); SetIndexDrawBegin(2,InpLipsShift+InpLipsPeriod); //--- 3 indicator buffers mapping SetIndexBuffer(0,ExtBlueBuffer); SetIndexBuffer(1,ExtRedBuffer); Set...
The "File pointer" notion is the same with "cursor" notion. The file pointer is defined with the position in the file. As far as reading goes on the pointer is moving to the right per one or several positions. Problem 36. Read the information about the important news from the file and...
the robot assesses historical and real-time data to identify potential trends , key support and resistance levels, and other relevant market signals specific to GBP/USD. The Robot opens positions every day, from Monday to Friday, and all positions are secured with Take Profit, Stop Loss, Traili...
Parsing of CSV files from the Signals section is a bit easier, while the file format for the MetaTrader 4 (*.history.csv) and MetaTrader 5 (*.positions.csv) signals is supported by the built-in MQL functions. more... Share Metatrader 5 / Metatrader 4 for MQL5 / MQL4 articles ...