工作已完成
指定
Hello guys,
I need a custom EA based on price action.
Buy rule (for long positions)
if (condition 1 AND (condition 2a OR condition 2b or condition 2c) {
buy()
}
Primary condition
condition 1 {
Market breaks below previous day (yesterday) low }
Secondary conditions
condition 2a {
At least one bar breaks below low of previous bar but closes above previous bar low on 1 hour chart }
condition 2b {
At least one bar breaks below low of previous bar but closes above previous bar low on 30 min chart }
condition 2c {
At least one bar breaks below low of previous bar but closes above previous bar low on 15 min chart }
Action
buy ()
if condition1 is true and condition 2a or 2b or 2c is true then place a buy stop order at previous day (yesterday) low
Stop order
Stop order is placed at today low
Profit taking
Exit the same day at the open of the last 30 min bar for the day.
Sell rule (for short positions)
if (condition 1 AND (condition 2a OR condition 2b or condition 2c) {
sell()
}
Primary condition
condition 1 {
Market breaks above previous day (yesterday) high }
Secondary conditions
condition 2a {
At least one bar breaks above high of previous bar but closes below previous bar high on 1 hour chart }
condition 2b {
At least one bar breaks above high of previous bar but closes below previous bar high on 30 min chart }
condition 2c {
At least one bar breaks above high of previous bar but closes below previous bar high on 15 min chart }
Action
buy ()
if condition1 is true and condition 2a or 2b or 2c is true then place a buy stop order at previous day (yesterday) low
Stop order
Stop order is placed at today high
Profit taking
Exit the same day at the open of the last 30 min bar for the day.
Risk management
l Takes preferred max risk ($) per trade from user as an input
l Calculates pip value
l Calculates #pips to risk (distance between entry and stop loss)
l Calculates dollar risk per lot (pip value * #pips to risk)
l Calculates #lot to trade (max risk / dollar risk per lot)
ü If #lot to trade is < 0.01 then trade is not placed
ü Only 1 trade per day (max # trade = 1)
ü If # of consecutive losses become 6 then stop trading for rest of the month.
ü If total number of losses become 6 then send a sms notification
Other rules
Instruments to trade:
l EUR/USD
l GBP/USD
l USD/JPY
l USD/CHF
l USD/CAD
l AUD/USD
l NZD/USD
Thank you