具有动态追踪止损和追踪利润的时间顾问。
OpenTimeTral2ea在指定的时间设置选定的订单类型,并为第一个市价订单使用动态追踪止损和追踪盈利。
选择订单类型的限制:
1. 您只能选择一种类型的市价单,买入或卖出。 对于选定的市价单,您无法选择挂单。
2. 挂单和限价单可以任意组合选择。
将第一个挂单或限价单转换为市价单后,剩余的挂单和限价单将被删除。
动态追踪止损用于市价单。 止损修改距离不大于买单当前买入价和卖单卖出价的追踪止损值,并使用线性或反馈加速公式在接近获利时减少追踪止损。
对于获利,也使用常量尾随值。 当当前价格接近获利水平时,获利被TralingProfit距离修改。
如果您不需要追踪止损或追踪利润,请选择相应的值0。
如果您不需要近似追踪止损,请选择值Ksl=0
如果您想使用利润作为可用资金的百分比,请将手数值设置为零。
输入参数
Lots=0.01; //working lot
Prots=0.01; // Percentage of available funds
slippage =2; //the level of acceptable slippage – requote in points
TakeProfit=500; //take profit in points
StopLoss=200; //stop loss in points
Open_Level_St=100; //distance level from the price for stop orders
Open_Level_Lim=200; //distance level from the price for limit orders
Tral_Stop=200; // Dist. persecutions StopLoss, Tral_Stop
Tral_Profit=100; // Dist. moving away TakeProfit, Tral_Profit
Ksl = 0.2; // StopLoss reduction coefficient, when approaching TakeProfit by the formula for Buy
// linear approximation SL = Bid – (Tral – 0.2(Bid –
OrderOpenPrice()))
// dynamic approximation SL = Bid – (SL – Ksl (Bid –
OrderOpenPrice()))
Open_Time=D’03.01.2019 13:00:00′; //the time of opening orders must be greater than the current time.
time_op = 600; // The lifetime of pending orders, in minutes, must be more than 11 minutes.
extern int Magic=5345; //the magic number of our orders
coming=linear; // the choice of a linear approximation or a dynamic Trailing stop
Open_Buy=false; //Yes/No working with buy orders
Open_Sell=false; //Yes/No working with sell orders
Open_Buy_Limit=false; //Yes/No working with buy limit orders
Open_Sell_Limit=false; //Yes/No working with sell limit orders
Open_Buy_Stop=True; //Yes/No working with buy stop orders
Open_Sell_Stop=True; //Yes/No working with sell stop orders