ENTRY RULES for E A
The Expert Advisor employs Moving Average (specified by MA_MODE), Stochastic oscillator and the Williams %R indicators to identify entry signals.
Next rule is The Expert Advisor can open positions and manage positions in both directions at the same time if a valid entry signal is received in that direction. Similarly, it can add to an existing position if a new signal is received in the same direction. It provides an optional feature to increase the lot-size using the ANOTHER_ORDER_LOTS_MULTIPLIER parameter.
There are six modes of signals as defined by the SIGNAL_MODE parameter. The Expert Advisor will identify on those signals as specified by this parameter.
a. Mode Numder 0 –BUY if Slow MA is in uptrend and Fast MA crossing up, SELL if Slow MA is in downtrend and Fast MA is crossing down.
b. Mode Numder 1 –BUY if Slow MA is in downtrend and Fast MA crossing up, SELL if Slow MA is in uptrend and Fast MA is crossing down.
c. Mode Numder 2 –BUY if Fast MA simply crossing up through Slow MA, SELL if Fast MA simply crossing down through Slow MA.
d. Mode Numder 3 –BUY ifFast MA crossing up through Slow MA and price is over Fast and Slow MA , and previous price was below Fast and Slow MA (range is crossing up through Fast MA). SELL Fast MA crossing downthrough Slow MA and price is below Fast and Slow MA , and previous price was above Fast and Slow MA (range is crossing downthrough Fast MA)
e. Mode Numder 4 –BUY if Fast MA crossing up through Slow MA and price is over Fast and Slow MA and previous price was below Fast and Slow MA (range is crossing up through Fast MA) and Williams%R was oversold.SELL if Fast MA crossing downthrough Slow MA and price is below Fast and Slow MA and previous price was above Fast and Slow MA (range is crossing downthrough Fast MA) and Williams%R was overbought.
f. Mode Numder 5- BUY if Fast MA crossing up through Slow MA and price is over Fast and Slow MA and previous price was below Fast and Slow MA (range is crossing up through Fast MA) andWilliams%R escaping from oversold zone. SELL if Fast MA crossing downthrough Slow MA and price is below Fast and Slow MA and previous price was above Fast and Slow MA (range is crossing downthrough Fast MA) and Williams %R escaping from overbought zone
EXIT RULES for EA
The Expert Advisor employs the following rules for closing a trade:
A trade is closed at Take Profit (TP) or Stop Loss (SL).
Next rule is when A trade is closed at protective Trailing Stop.
Next rule is If the net profit of all open positions reaches PROFIT_USD then all open positions are closed if PROFIT_USD_CLOSE_ONE is FALSE. If PROFIT_USD_CLOSE_ONEis TRUE, then only the most profitable trade is closed.
4. Next rule is If the net loss of all open positions reaches LOSS_USD then all open positions are closed if LOSS_USD_CLOSE_ONE is FALSE. If LOSS_USD_CLOSE_ONE is TRUE, then only the worst (most losing) trade is closed.