Contributed by: Rietsuiker
Code by: barabashkakvn
This Expert Advisor (EA) utilizes the iMA (Moving Average) to make trades, maintaining only a single position in the market at any given time.
Opening Rules (When Reverse Signals is set to false):
- Open BUY: Execute when the Price ASK is greater than the MA on bar #0 plus the MA delta.
- Open SELL: Execute when the Price BID is less than the MA on bar #0 minus the MA delta.
If Reverse Signals is set to true, the opening signals will be flipped.
Closing Rules (When Reverse Signals is set to false):
- Close BUY: Execute when the Price ASK is less than the MA on bar #0 minus (MA delta * MA delta coefficient for close).
- Close SELL: Execute when the Price BID is greater than the MA on bar #0 plus (MA delta * MA delta coefficient for close).
If Reverse Signals is set to true, the closing signals will also be reversed.
MA Delta represents the distance between the price and the indicator.
Comments 0