Details
e-OpenTradesSheduller expert advisor makes it possible to to open new orders on schedule
Trade params
int AccDigits = 5; set 4 for 4-digit quotes; set 5 for 5-digit quotes extern bool MarketExecution = false;
true: set true if your broker allows only market execution.
false: set false by default.
There are 3 kinds of execution - Instant Execution, Request Execution and Market Execution.
Market execution forbids to set sl and tp with new order because open price is undefined.
Instead, a market order should be placed and then a take profit and/or stop loss added to the position.
Slippage = 3; max. allowable slippage value, pips
Magic = 20100315; some unique orders ID
OrdersComment = ""; string comment added to orders
Trade days
MondayOn = true; trade on Monday true/false
TuesdayOn = true; trade on Tuesday true/false
WednesdayOn = true; trade on Wednesday true/false
ThursdayOn = true; trade on Thursday true/false
FridayOn = false; trade on Friday true/false
SaturdayOn = false; trade on Saturday true/false
SundayOn = false; trade on Sunday true/false
Buy Orders
Buy.On = true; allow Buy orders
Buy.OpenTime = "15:45-15:55; 17:30-17:45"; open time for Buy orders by Broker time
Buy.Count = 1; open 1 Buy order
Buy.Lots = 0.1; Buy lots volume
Buy.StopLoss = 100; StopLoss = 100 pips (0 = no StopLoss)
Buy.TakeProfit = 100; TakeProfit = 100 pips (0 = no TakeProfit)
Buy.FixedPriceStopLoss = 0.0; set any price to override Buy.StopLoss in pips
Buy.FixedPriceTakeProfit = 0.0; set any price value to override Buy.TakeProfit in pips
Sell Orders
Sell.On = false; the same as for Buy section
Sell.OpenTime = "15:45-15:55; 17:30-17:45";
Sell.Count = 1;
Sell.Lots = 0.1;
Sell.StopLoss = 100;
Sell.TakeProfit = 0;
Sell.FixedPriceStopLoss = 0.0;
Sell.FixedPriceTakeProfit = 0.0;
BuyLimit Orders
BuyLimit.On = false; allow BuyLimit orders
BuyLimit.SetTime = "11:45-16:50; 17:20-17:45; 18:25-19:40"; time to set BuyLimit orders by Broker time
BuyLimit.Count = 3; set 3 BuyLimit orders
BuyLimit.FirstOrderDist = 50; distance between the market and first BuyLimit order, pips
BuyLimit.OrdersDist = 10; distance between BuyLimit orders, pips
BuyLimit.Lots = 0.1; BuyLimit lots volume
BuyLimit.StopLoss = 100; StopLoss = 100 pips (0 = no StopLoss)
BuyLimit.TakeProfit = 100; TakeProfit = 100 pips (0 = no TakeProfit)
BuyLimit.FixedPriceStopLoss = 0.0; set any price to override BuyLimit.StopLoss in pips
BuyLimit.FixedPriceTakeProfit = 0.0; set any price to override BuyLimit.TakeProfit in pips
SellLimit Orders
SellLimit.On = false; the same as for BuyLimit section
SellLimit.SetTime = "11:00-13:30";
SellLimit.Count = 3;
SellLimit.FirstOrderDist = 50;
SellLimit.OrdersDist = 10;
SellLimit.Lots = 0.1;
SellLimit.StopLoss = 100;
SellLimit.TakeProfit = 100;
SellLimit.FixedPriceStopLoss = 0.0;
SellLimit.FixedPriceTakeProfit = 0.0;
BuyStop Orders
BuyStop.On = false; the same as for BuyLimit section
BuyStop.SetTime = "02:00-17:20";
BuyStop.Count = 3;
BuyStop.FirstOrderDist = 50;
BuyStop.OrdersDist = 10;
BuyStop.Lots = 0.1;
BuyStop.StopLoss = 100;
BuyStop.TakeProfit = 100;
BuyStop.FixedPriceStopLoss = 0.0;
BuyStop.FixedPriceTakeProfit = 0.0;
SellStop Orders
SellStop.On = false;the same as for BuyLimit section
SellStop.SetTime = "19:00-19:30; 23:15-2:45";
SellStop.Count = 3;
SellStop.FirstOrderDist = 50;
SellStop.OrdersDist = 10;
SellStop.Lots = 0.1;
SellStop.StopLoss = 90;
SellStop.TakeProfit = 120;
SellStop.FixedPriceStopLoss = 0.0;
SellStop.FixedPriceTakeProfit = 0.0;