This system was based off of this system introduced to us by Ace284
The EA is TickDatabase enabled.
The EA is TickDatabase enabled.
- xtern string Remark1 = "== Main Settings ==";
- extern int MagicNumber = 0;
- This number should be unique when multiple EAs are attached to a terminal.
- extern bool SignalsOnly = False;
- If set to true, the EA will only alert you to a trade using any combination of the alerts below.
- extern bool Alerts = False;
- If set to true, the EA will send a pop-up alert when a trading signal arrives.
- extern bool SignalMail = False;
- If set to true, the EA will send you an e-mail (assuming you set up your mail in your MT4 Terminal.) when a trading signal arrives.
- extern bool PlaySounds = False;
- If set to true, the EA will play the file, "alerts.wav" when a trading signal arrives.
- extern bool ECNBroker = False;
- Some brokers require EAs to first place a trade, and then modify the trade with the stoploss and takeprofit. If your broker requires this, set this value to True.
- extern bool TickDatabase = True;
- If set to True, the EA will send tick data into the tick database.
- extern bool CloseOnOppositeSignal = True;
- If set to true, the EA will close a trade if an opposite trading signal appears.
- extern bool EachTickMode = True;
- If set to true, the EA will take a trade immediately if it sees a signal. If set to false, the EA will take a trade only if there is a signal at the end of the bar.
- extern double Lots = 0;
- Fixed lot size
- extern bool MoneyManagement = False;
- Enables/Disables the lot sizing function.
- extern int Risk = 0;
- The percent of your available margin that you are willing to put into a trade.
- extern int Slippage = 5;
- Maximum slippage allowed when placing an order.
- extern bool UseStopLoss = True;
- Enables/Disables the Stoploss
- extern bool UseFixedStopLoss = True;
- Enables/Disables fixed stoploss
- extern int StopLoss = 100;
- Fixed stoploss in pips
- extern bool UseStopLossMultiplier = True;
- Enables/Disables the stoploss multiplier
- extern double StopLossMultiplier = 3;
- This is the stoploss based of a multiple of the range.
- extern bool UseTakeProfit = False;
- Enables/Disables Takeprofit
- extern bool UseFixedTakeProfit = True;
- Enables/Disables Fixed Take Profit
- extern int FixedTakeProfit = 60;
- Fixed TakeProfit in pips
- extern bool UseTakeProfitMultiplier = True;
- Enables/Disables the takeprofit multiplier
- extern double TakeProfitMultiplier = 3;
- Multiplier in multiples of the range.
- extern bool UseTrailingStop = False;
- Enables/Disables trailing stop.
- extern int TrailingStop = 30;
- Trailing stop in pips. Note, the EA will trail profits only.
- extern bool MoveStopOnce = False;
- Enables/disables the move-to-breakeven function.
- extern int MoveStopWhenPrice = 50;
- Trigger price to move the stoploss.
- extern int MoveStopTo = 1;
- Price in pips relative to breakeven to move the stoploss to once the trigger price is hit.
- Using these values as an example, the EA will move the stoploss to breakeven + 1 if the trade hits 50 pips profit.
- extern string Remark2 = "";
- extern string Remark3 = "== Breakout Settings ==";
- extern int DayStart = 0;
- 0 = Sunday
- 1 = Monday
- 2 = Tuesday
- 3 = Wednesday
- 4 = Thursday
- 5 = Friday
- extern int BarsFromWeekStart = 1;
- Number of bars to count from the week's start.
- extern int BreakoutBuffer = 0;
- Number of pips added to the top and bottom of the range.
- extern int MaxTradesPerWeek = 10;
- Maximum trades allowed per week
- extern int MaxLongsPerWeek = 8;
- Max long trades per week
- extern int MaxShortsPerWeek = 8;
- Max short trades per week
- extern string Days = "Sunday is 0, Monday 1, Friday 5, etc";
- extern bool UseCloseOnWeekEnd = False;
- Enables/Disables the week-end liquidation function
- extern int ClosePositionsDay = 5;
- Day that the trades are all forcibly closed.
- extern string ClosePositionTime = "23:00";
- Broker time where trades are all forcibly closed. Remember to use HH:MM format.
Note: You can enable all of the stoploss options if you so choose, just keep in mind that the EA will use the tightest stoploss available to it.
Attached File(s)
4H Weekly Box Breakout [TD].mq4
26 KB
|
1,676 downloads