MySystem - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 Resources

Author of this idea : Collector
MQL5 code author : Balabashka Kong
The EA only runs when a new bar appears. Trading signals from the iBullsPower and iBearsPower indicators are considered only if the market does not have an EA open position (the search is performed by the current symbol and the current unique EA identifier - the magic number ).
Both indicators have only one setting - Bull and Bear: Average Period . Trading signal formation algorithm: data from two bars - bar current and bar current + 1 - both indicators take their values divided by 2
Double previous page = ((Bear[ 1 ]+Bull[ 1 ])/ 2.0 ); Double curr = ((Bear[ 0 ]+Bull[ 0 ])/ 2.0 );
If the average value of the previous bar is less than the average value of the current bar, open buy:
if (previous<current&¤t< 0 ) { //Close position (POSITION_TYPE_SELL); double sl=(Inp stop loss == 0 )? 0.0 :m_symbol. ask ()-ExtStopLoss; if (sl>= m_symbol.bid ()) // Event: The position has not been opened yet and must have been closed { Previous article = 0 ; return ; } Double tp=(InpTakeProfit== 0 )? 0.0 :m_symbol. ask ()+ExtTakeProfit; OpenBuy(sl,tp); return ; }
If the average value of the previous bar exceeds the average value of the current bar, open a sell:
if (previous page>current&& current> 0 ) { //Close position (POSITION_TYPE_BUY); double sl=(Inp stop loss == 0 )? 0.0 :m_symbol. Bid ()+ExternalStop; if (sl<= m_symbol.ask ()) // Event: The position has not been opened yet and must have been closed { Previous article = 0 ; return ; } Double tp=(InpTakeProfit== 0 )? 0.0 :m_symbol. bid ()-ExtTakeProfit; OpenSell(sl,tp); return ; }
EURUSD, M15:

Attachment download
📎 mysystem.mq5 (33.98 KB)
Source: MQL5 #22016
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •