adrian.tan.7568596

Active trader turtle trading modified version

144
Modified the script from from turtle trader to only long when high break 55 days high and sell when low break 20 days low
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//@version=2
//coded by tmr0
//original idea from «Way of the Turtle: The Secret Methods that Turned Ordinary People into Legendary Traders» (2007) CURTIS FAITH
strategy("Turtles strategy modified", shorttitle = "Turtles", overlay=true, pyramiding=5, default_qty_type= strategy.cash, default_qty_value = 1000)

enter_slow = input(55, minval=1)
exit_slow = input(20, minval=1)
year_from = input(2014, minval=2000)
year_before = input(2015, minval=2000)

slowL = highest(enter_slow)
slowLC = lowest(exit_slow)
//slowS = lowest(enter_slow)
//slowSC = highest(exit_slow)

enterL2 = high > slowL[1]
exitL2 = low <= slowLC[1]
//enterS2 = low < slowS[1]
//exitS2 = high >= slowSC[1]


//bgcolor(exitL1 or exitL2? red: enterL1 or enterL2? navy:white)

strategy.entry("slow L", strategy.long, when = enterL2 and year>=year_from and year<year_before)
//strategy.entry("slow S", strategy.short, when = enterS2 and year==year_defined)
strategy.close("slow L", when = exitL2 and year>=year_from and year <year_before)
//strategy.close("slow S", when = exitS2 and year==year_defined)