Bollinger Bands strategy with RSI and MACD v1.0 This is a strategy based on the Bollinger Bands, where buy trades are made when the price crosses the lower line of the Bollinger Bands upwards, and sell trades are made when the price crosses the upper line downwards.
In addition, it is possible through the inputs to enable trading with RSI and MACD, so that buy or sell trades are supported by these two indicators.
Trades are partially and fully closed in the following way, a buy trade will close half of the position when the price touches the middle line of the Bollinger bands and will be fully closed when the price touches the upper band. In the case of a sell position, half of the position will be closed if the price touches the middle band and the entire position will be closed when the price touches the lower band. Alternatively, a fixed take profit can be placed. In case the price moves against us, trailing stops can be placed.
In case of selecting to use RSI, MACD, or MACD variation, trades will be executed as long as The Bollinger Bands, and all the above-mentioned indicators give the same signals, either buy or sell.
For example in the case of selecting only Use RSI, buy trades would be made as long as RSI and BB give buy signals.
Strategy inputs:
-BB source: Bollinger Bands price source.
-Bollinger Bands SMA length: Bollinger Bands simple moving average length.
-Bollinger Bands StdDev length: Bollinger Bands standard deviation length.
-Trail Long Loss (%): Distance in percentage at which the stop loss will initially be placed for buy trades.
-Trail Short Loss (%): Distance in percentage at which the stop loss will be initially placed for sell trades.
-Maximum orders: Maximum of simultaneous operations, for example, if it is 3, up to 3 parallel operations of buy and up to 3 parallel operations of sell will be carried out.
-Position size: Number of contracts per trade.
-Use RSI: If selected, the strategy will also trade based on oversold or overbought signals provided by the RSI.
-RSI source: RSI price source.
-RSI period: The RSI period to use.
-RSI value for buy: If the RSI is below this value, it will give a buy signal.
-RSI value for sell: If the RSI value is above this value, it will give a sell signal.
-Use MACD: If selected, buy trades will be made when the MACD crosses 0 upwards, and sell trades will be made when the MACD crosses 0 downwards.
-Use MACD variation: Only available if MACD is previously selected. In this case, buy trades are made if the MACD value in the last 3 candles has been decreasing, and sell trades are made if the MACD value has been increasing.
-MACD source: MACD price source.
-MACD fast length: MACD fast EMA lenght.
-MACD slow length: MACD slow EMA lenght.
-MACD signal length: MACD signal EMA lenght.
-Use maximum TP long: If selected, a fixed take profit will be placed for buy trades. The position could be closed before reaching this take profit if the price touches one of the lower or upper lines first.
-Maximum take profit long (%): Distance in percentage at which the take profit will be placed for buy trades.
-Use maximum TP short: if selected, a fixed take profit will be placed for sell trades. The position could be closed before reaching this take profit if the price touches one of the lower or upper lines first.
-Maximum take profit short (%): Distance in percentage at which the take profit will be set for sell trades.
I hope you like it and as always all feedback is welcome.
Rsimacd
MACRS {Lite}This is the open-source stripped down version of the full-featured RSI-MACD indicator (MACRS), with the ADO and the option to filter out weekend price action removed.
The main oscillator is the RSI modulated by the MACD (default). The RSI mode can be disabled to revert to a normal MACD oscillator for the main oscillator.
When the main oscillator (thicker line) is > 0, it is green; and if it is < 0, it is red.
The MACD can be re-scaled and whenever its value > 100, a background fill between the oscillator and the zeroline appear to indicates overbought condition; and < -100 indicates oversold condition. The user can tweak the scaling factor to optimize this for a given chart and timeframe.
A (thick transparent light blue) volume oscillator is also provided. An increase in volume trend provides confirmation of (or solidifies) the movements in the main oscillator over that period. A falling volume oscillator trend raises doubts on the main oscillator trend, and hints of the possibility of a counter-trend (also look at the secondary ADO oscillator for clues).
The novel aspects and principles of this indicator and this source code are the property of © cybernetwork.
This indicator and script is free for the TV community to use.