작업 종료됨
명시
This EA trades with time and price actions. It takes the high and low prices of a specific period of time to form a price channel, and open positions when the price breaks through the channel area.
Setup
Default time frame = 5m
Channel values are calculated and stored:
- At the last bar close before trade session starts (e.g. With 5m timeframe and trade session starts at 11:00, calculation is performed when the 10:55 bar closes)
- If the EA is launched after trade session has started (e.g. Trade session starts at 11:00 but EA only launched at 12:00. Need to make sure the correct values are based on the current session)
Clear channel values when trade session ends
Channel value calculation:
Channel high = highest price among an hour before the trade start time
Channel low = lowest price among an hour before the trade start time
Channel depth = Channel high - Channel low
Parameters:
Trade session start (server time) = 11:00
Trade session end (server time) = 15:59
TP Factor = 0.5
Fast EMA period = 3
Signal trend EMA period = 10
Trend EMA period = 200
Use Trend EMA filter = True
During the trade session, at every bar close, 3 steps will be performed:
Step 1: Cancel any pending orders that’s going against the trend
Step 2: Create new pending orders when condition is met
Step 3: Manage any opened positions
Step 1: Cancel pending orders that’s going against trend
● If Fast EMA < Signal EMA, cancel any pending buy stop order
● If Fast EMA > Signal EMA, cancel any pending sell stop order
Step 2: Create new pending order
Buy stop order
Conditions:
- No existing buy stop order
- No existing long position
- Current price closes above channel high
- Fast EMA > Signal EMA
- Channel high > Trend EMA (option to enable / disable)
If all conditions are met, create 2 buy stop order (A1 and A2)
Position A1:
● Place at channel high
● TP = Open price + (Channel depth * TP Factor)
● When TP is hit, immediately set SL of position A2 to breakeven
Position A2:
● Place at channel high
Sell stop order
Conditions:
- No existing sell stop order
- No existing short position
- Current price closes below channel low
- Fast EMA < Signal EMA
- Channel low < Trend EMA (option to enable / disable)
If all conditions are met, create 2 sell stop order (B1 and B2)
Position B1:
● Place at channel low
● TP = Open price - (Channel depth * TP Factor)
● When TP is hit, immediately set SL of position B2 to breakeven
Position B2:
● Place at channel low
Manage opened positions
For Position A1 and A2:
- Bar closed below channel low
- When in profit and bar closed below the low of previous bar
- When in profit and bar closed below the high of previous bar
Lot size calculation
There are 3 options for lot size calculation.
- Fixed lot size
- Risk % per trade – e.g. if set to 0.015, in case of hitting SL the loss of the position should be 1.5% of the balance
- % of equity
Position A1 & B1 would have separated settings to position A2 & B2.
Parameters:
[A1/B1] Lot size = “Fixed lot size”
[A1/B1] Fixed lot size = 0.01
[A1/B1] Risk % per trade = 0.015
[A1/B1] % of equity = 0.02
[A2/B2] Lot size = “Fixed lot size”
[A2/B2] Fixed lot size = 0.01
[A2/B2] Risk % per trade = 0.015
[A2/B2] % of equity = 0.02
Other requirements
- Trade time adjust to daylight saving
- Only check and manage the pending orders and positions which have the same magic number set by this EA