Charts_and_Such_1

SMA Cross Entry & Exit Strategy

This is a TradingView Strategy Script meaning you can't execute real trades using your exchange API connected to your TradingView account, it is designed for backtesting only

This is a basic backtesting script for charting the bullish and bearish cross of two user defined simple moving averages, select the cog next to the name of the script ON the price chart in the left hand corner. The script will print to the screen either "Long Entry" or "Short Entry" depending on the direction of the cross. The script using TradingView strategies will subsequently close the opposite of the position that is executed when the bullish or bearish cross occurs. Simply put, if you are short and a bullish cross occurs, your short trade will close and be logged in strategies and the long will fire. You can pyramid the long and short positions to continue entering as long as the trend doesn't flip. You will find this in the script settings. Since this script is for backtesting you can manually set the "backtesting range" for TradingView Strategies and firing the "Long Entry" and "Short Entry". This as well, is in the settings.


Notice: When the SMA cross occurs, you have to wait till the next candle before TradingView Strategy will print the "Long Entry" or "Short Entry" to the screen




TradingView - How To Use Strategies: www.tradingview.com/wiki/Strategies
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?