Ismael03

Bot trading rsiema5020

OANDA:GBPJPY   Bảng Anh/ Yên Nhật
//@version=4
strategy(title="GBP/JPY Scalping Bot", shorttitle="GBP/JPY Bot", overlay=true)

// Definición de los indicadores y parámetros
ema_20 = ema(close, 20)
ema_50 = ema(close, 50)
rsi = rsi(close, 14)

// Definición de las condiciones de entrada y salida
longCondition = crossover(ema_20, ema_50) and rsi > 50
shortCondition = crossunder(ema_20, ema_50) and rsi < 50

if (longCondition)
strategy.entry("Long", strategy.long)

if (shortCondition)
strategy.entry("Short", strategy.short)

// Definición de los niveles de stop loss y take profit
strategy.exit("Exit Long", "Long", stop=close - atr(14)*2, limit=close + atr(14)*3)
strategy.exit("Exit Short", "Short", stop=close + atr(14)*2, limit=close - atr(14)*3)
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.