DaneSchell

Simple Moving Average Cross

DaneSchell Uppdaterad   
The script uses 3 simple moving averages that you can define (SMA Top, SMA Mid, SMA Long).

Once the SMA Top is above the SMA Mid and the SMA Mid is above the SMA Top a long position is entered.

Once the SMA Top is below the SMA Mid and the SMA Mid is below the SMA Top a short position is entered.

You may define how long before these positions are entered by adjusting the bars in the Inputs section.

A setting of 0 will enter a position as soon as the conditions are met,
whereas a setting of 5 will wait 5 bars after the conditions are met before entering the positions.
Versionsinformation:
UPDATING DESCRIPTION / TYPOS

The script uses 3 simple moving averages that you can define ( SMA Top, SMA Mid, SMA Low).

Once the SMA Top is above the SMA Mid and the SMA Mid is above the SMA Low a long position is entered.

Once the SMA Top is below the SMA Mid and the SMA Mid is below the SMA Low a short position is entered.

You may define how long before these positions are entered by adjusting the bars in the Inputs section.

A setting of 0 will enter a position as soon as the conditions are met,
whereas a setting of 5 will wait 5 bars after the conditions are met before entering the positions.
Versionsinformation:
Updated the when to close the position as it was improperly set.
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?