In addition, it is possible through the inputs to enable trading with and , 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 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 , , or variation, trades will be executed as long as The , and all the above-mentioned indicators give the same signals, either buy or sell.
For example in the case of selecting only Use , buy trades would be made as long as and BB give buy signals.
-BB source: price source.
-Bollinger Bands length: length.
-Bollinger Bands StdDev length: 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 source: price source.
-RSI period: The period to use.
-RSI value for buy: If the is below this value, it will give a buy signal.
-RSI value for sell: If the value is above this value, it will give a sell signal.
-Use MACD: If selected, buy trades will be made when the crosses 0 upwards, and sell trades will be made when the crosses 0 downwards.
-Use variation: Only available if is previously selected. In this case, buy trades are made if the value in the last 3 candles has been decreasing, and sell trades are made if the value has been increasing.
-MACD source: price source.
-MACD fast length: fast lenght.
-MACD slow length: slow lenght.
-MACD signal length: signal 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.
Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.