Lavoro terminato
Specifiche
This is a job for two expert advisors with very similar functionality. The difference is the trading entry logic.
The expert advisors required are based on pivots, here are the details:
MQL file required at the end please.
EXPERT 1
FIRST STEP: CALCULATE THE PIVOTS
At 8am CET every day the EA should use the opening price at 8am CET to calculate our pivots.
The pivots are percentages of the opening price, the percentages are +0.5%, +1.0% and +1.5% as well as -0.5%, -1.0% and -1.5%.
Example:
Price of FTSE at 8am CET is 7000, so all of the pivots are calculated on 7000. Here are two examples of the pivot calculation
+0.50% of 7000 = 7035
-1.00% of 7000 = 6930 and so on
The Bias will be calculated at 8am CET by a combination of two indicators:
1. SMA of 55 - is the SMA pointing up? If yes, it's Bullish. Else, it's Bearish
2. MACD (72 156 54) - is the histogram above 0? If yes, it's Bullish. Else, it's Bearish
NEXT STEP: TRADING LOGIC
Depending on the market bias, the EA will open limit orders based on the following:
TRADING PARAMETERS
1. Stop Loss Level
This is a input for a fixed level, for example the input will be 25 points.
2. Take Profit Level
This should be a multiplier of the stop loss.
For example if the multiplier is 4.0 then the TP will need to 4.0 times
bigger than the stop loss.
If the stop loss is 25 points, then the take profit target would be 100 points (4 x 25).
3. LOT SIZE
4. MOVE TO BREAKEVEN
Option for MoveToBreakEven after reaching 50% of target.
For example is the take profit is 100 points, then the move to
break even will kick in after reaching 50 points profit.
5. AUTOMATIC CLOSE TRADES AT PARTICULAR TIMES
Close all trades by 19:00 CET
No trades allowed to remain open over the weekend
The EA should keep a track of our total profit for the day.
Example trade 1 is a stop loss (total gain = -1R)
Example trade 2 is
a stop loss (total gain = -2R)
Example trade 3 hits target for 4R (total gain = +2R)
Example trade 4 hits target for 4R (total gain = +6R)
Close all remaining trades
8. NOTIFICATIONS
Option for Push, Email and Alerts
EXPERT 2
FIRST STEP: CALCULATE THE PIVOTS (Same as Expert 1)
NEXT STEP: CALCULATE THE MARKET BIAS (Same as Expert 1)
NEXT STEP: TRADING LOGIC
BUY
If price breaks above any +0.5%, +1.0% or +1.5% pivot level by 20 points or more, then open a buy limit order to buy at that pivot
level.
For example if price breaks through the +0.5% level and pulls back, we want to buy limit at the +0.5% level.
The EA should only open
one limit order, per pivot level, per day. This means the EA could open buy orders order at +0.5% and +1.0% and +1.5%, depending on
price action. But it would not open more than one trade at each level in a single day.
SELL
If price breaks below any -0.5%, -1.0% or -1.5% pivot level by 20 points or more, then open a sell limit order to sell at that pivot
level.
For example if price breaks through the -0.5% level and then bounces, we want to sell limit at the -0.5% level.
The EA should only
open one limit order, per pivot level, per day. This means the EA could open an sell orders at -0.5% and -1.0% and -1.5%, depending
on price action. But it would not open more than one trade at each level in a single day.
The EA could possibly open a maximum of six trades in one day.
TRADING PARAMETERS
1. Stop Loss Level (same as Expert 1)
2. Take Profit Level (same as Expert 1)
3. Lot Size (same as Expert 1)
4. MOVE TO BREAKEVEN (same as Expert 1)
5. AUTOMATIC CLOSE TRADES AT PARTICULAR TIMES (same as Expert 1)
6. RESTRICT TRADES (same as Expert 1)
7. DAILY PROFIT TARGET (same as Expert 1)
8. NOTIFICATIONS (same as Expert 1)