FX:CADJPY   ดอลลาร์แคนนาดา / เยนญี่ปุ่น
//@version=4
strategy("Stratégie des Bandes de Bollinger", overlay=true)

// Paramètres des Bandes de Bollinger
length = input(20, minval=1, title="Longueur")
mult = input(2.0, minval=0.1, title="Multiplicateur")

// Calcul des Bandes de Bollinger
basis = sma(close, length)
dev = mult * stdev(close, length)
upper = basis + dev
lower = basis - dev

// Points d'entrée
longCondition = crossover(close, upper) // Signal d'achat lorsque le prix dépasse la bande de Bollinger supérieure
if (longCondition)
strategy.entry("Achat", strategy.long)

// Points de sortie
stopLoss = input(1.0, title="Stop Loss (%)") // Pourcentage de perte maximal autorisé
takeProfit = input(2.0, title="Take Profit (%)") // Pourcentage de profit minimal attendu

strategy.exit("Vente", "Achat", stop=close*(1-stopLoss/100), limit=close*(1+takeProfit/100))
คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ