작업 종료됨
명시
Shifting MA's
MQL4
Any currency pair
Any time frame
Slippage function
Spread function
LONG:
(Must have its own input fields as the variables/criteria will be different to SHORT):
MA
Period - input field
MA Shift - input field
MA Method - input field
MA Apply to - input field
Max Deals for Consecutive Time Frames - input field (example 5 or 15)
Only one Buy open within the same Time Frame
Lot size - input field
Take Profit - input field
Trailing stop - input field (function on each order separately)
Trailing stop - On/Off
selection
PM = Previous Move and must always be a positive value.
- If previous candle was up, the “Move” will be Close less Open
- Example Close = 1300 & Open = 1290 so “Move” = 10 (positive)
- If previous candle was down, the “Move” will be Close less Open * -1
- Example Close = 1300 & Open = 1315 so “Move” = (-15 * -1) (positive)
Methodology - BUY:
A) Open Buy’s in the following order:
1. Previous candle close is below previous MA, and
Current High moves higher than current MA + PM, then
Open at level current MA + Previous Move
Example:
- Previous Close is 1900
- Previous MA is 2000
- Previous Move (PM) is 20
- Current MA is 2010
- Current High is 2040
- Open
Buy at 2030 (2010 + 20)
2. Buy if No 1 above did not trigger
Previous candle close is below previous MA, and
Current High moves lower than current MA + PM, and
Current candle closes above current MA, then
Open at close of current candle
Example:
- Previous Close is 1900
- Previous MA is 2000
- Previous Move (PM) is 20
- Current MA is 2010
- Current High is 2025
- Current Close is at 2022
- Open Buy at 2022
3. Buy if No 1 or No 2 above has already triggered, and
Current candle closes above or equal to Current MA
Repeat for every candle until “Max Consecutive Deals” is reached
B) Close when one of the following is triggered whichever first:
- Take Profit, OR
- Stop Loss (has two criteria - see next step)
Two criteria for Stop Loss
- Current Low < (Previous Close less Previous Move), AND
- Current Low < Current MA, OR
4. Price closes below current MA
SHORT (Must have its own input fields as the variable/criteria will be different to LONG):
MA Period - input field
MA Shift - input field
MA Method - input field
MA Apply to - input field
Max Deals for Consecutive Time Frames - input field (example 5 or 15)
Only
one Sell open within the same Time Frame
Lot size - input field
Take
Profit - input field
Trailing stop - input field (function on each order separately)
Trailing stop - On/Off selection
Methodology:
Same as for LONG but just to the opposite