Bands 2 - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources
Idea comes from : screenwriter .
MQL5 code by : Vladimir Karputov .
The strategy is based on analyzing the value of the indicator iBands (Bollinger Bands, BB) at bar #0 relative to the closing price of bar #0. If the closing price of bar #0 is within the Bollinger Bands indicator and there are no pending orders, place three stop-loss buy orders and three stop-loss sell orders in steps between pending orders .
Also, you can set your own take profit levels for each pair of orders ( first take profit , second take profit , and third take profit ). Stop loss can be set via the Bollinger Bands indicator or the Moving Average indicator - it will be the parameter's responsibility to track the stop loss .
Orders can be placed within the following time intervals: start of hour to end of hour . Each order is assigned a lifecycle hour end equal to the parameter: For example, if the hour end is 23, it means that all pending orders will be automatically deleted at 11 pm. All pending orders will also be removed at each new bar - therefore, at each new bar, buy stop orders and sell stop orders will be placed at the changed price of the Bollinger Bands indicator.
You can enable tracking in the EA - for this, the parameter Trailing Stop must be greater than zero. You can also use the trailing feature to set your stop loss order to break even. For this purpose, you should select Stop Loss No Parameter Value Stop Loss type . At the same time, you should keep in mind that there will be positions with losses. Therefore, you must close the position manually.
Moving average indicator parameters
Bollinger Bands indicator parameters:
Attachment download
📎 bands_2.mq5 (41.78 KB)
Source: MQL5 #20752
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •