Convertir codigo de de pine (tradingview) a metatrader 5

MQL5 Uzman Danışmanlar

İş tamamlandı

Tamamlanma süresi: 15 gün

İş Gereklilikleri

hola buenos dias necesito convertir el siguiente codigo de pine hecho para tradingview a metatrader5, vigilando que la estrategia funcione exactamente igual que en tradingview


//@version=5

strategy("Estrategia de Scalping Optimizada con Apalancamiento", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=5)

 

// Configuración de indicadores

lengthRSI = input.int(14, "Longitud RSI")

upperThresholdRSI = input.int(70, "Umbral Superior RSI")

lowerThresholdRSI = input.int(30, "Umbral Inferior RSI")

rsi = ta.rsi(close, lengthRSI)

 

// Configuración de Bandas de Bollinger para confirmación

lengthBB = input.int(20, "Longitud BB")

multBB = input.float(2.0, "Multiplicador BB")

basisBB = ta.sma(close, lengthBB)

devBB = multBB * ta.stdev(close, lengthBB)

upperBB = basisBB + devBB

lowerBB = basisBB - devBB

 

// Opción para elegir operaciones en largo, corto o ambos

tradeDirection = input.string("both", "Dirección de Operación", options=["long", "short", "both"])

 

// Opción para apalancamiento

leverage = input.float(1.0, "Apalancamiento", minval=1.0, maxval=100.0, step=0.1)

 

// Señales de entrada más selectivas

longCondition = (rsi < lowerThresholdRSI) and (close < lowerBB)

shortCondition = (rsi > upperThresholdRSI) and (close > upperBB)

 

// Gestión de riesgo dinámica basada en la volatilidad

atr = ta.atr(14)

riskPerTrade = input.float(1.0, "Riesgo por Operación (%)", step=0.1)

stopLossATRMultiple = input.float(2.0, "Múltiplo de ATR para Stop Loss", step=0.5)

 

// Cálculo de tamaño de posición basado en el riesgo, ATR y apalancamiento

riskAmount = strategy.equity * riskPerTrade / 100

positionSize = (riskAmount / (atr * stopLossATRMultiple)) * leverage

 

// Ejecución de órdenes con gestión de riesgo basada en la dirección seleccionada

if (tradeDirection == "long" or tradeDirection == "both") and longCondition

    strategy.entry("Compra", strategy.long, qty=positionSize)

    strategy.exit("StopLoss/TakeProfit Compra", "Compra", stop=close - atr * stopLossATRMultiple, limit=close + atr * stopLossATRMultiple * 2)

 

if (tradeDirection == "short" or tradeDirection == "both") and shortCondition

    strategy.entry("Venta", strategy.short, qty=positionSize)

    strategy.exit("StopLoss/TakeProfit Venta", "Venta", stop=close + atr * stopLossATRMultiple, limit=close - atr * stopLossATRMultiple * 2)

 

// Visualización en gráfico

plot(upperBB, "Banda Superior BB", color=color.red)

plot(basisBB, "Banda Media BB", color=color.blue)

plot(lowerBB, "Banda Inferior BB", color=color.green)

hline(upperThresholdRSI, "Umbral Superior RSI", color=color.red)

hline(lowerThresholdRSI, "Umbral Inferior RSI", color=color.green)


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(154)
Projeler
258
24%
Arabuluculuk
12
25% / 8%
Süresi dolmuş
15
6%
Yüklendi
2
Geliştirici 2
Derecelendirme
(430)
Projeler
488
33%
Arabuluculuk
25
40% / 48%
Süresi dolmuş
7
1%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(467)
Projeler
496
53%
Arabuluculuk
10
60% / 20%
Süresi dolmuş
3
1%
Çalışıyor
4
Geliştirici 4
Derecelendirme
(792)
Projeler
1361
72%
Arabuluculuk
112
29% / 48%
Süresi dolmuş
340
25%
Çalışıyor
5
Geliştirici 5
Derecelendirme
(121)
Projeler
157
37%
Arabuluculuk
7
57% / 0%
Süresi dolmuş
27
17%
Çalışıyor
6
Geliştirici 6
Derecelendirme
(561)
Projeler
928
48%
Arabuluculuk
301
59% / 25%
Süresi dolmuş
123
13%
Yüklendi
Benzer siparişler
Me Gustaría la creación de Bots que funcione en forex , con la estrategia de smart money . orden block , FGV. y complementarla con medias móviles y Fibonacci. en 15 min
Hola, soy Pedro, gestor del Darwin KBS. Buscamos un programador de MQL5 con experiencia para realizar varios proyectos y tener una relación de aproximadamente 12 meses realizando Experts Advisors según nuestros requerimientos. Imprescindible experiencia amplia en MQL5 y que hable Español. Un saludo
I want to learn how to use a robot to pass funding tests and to operate and maintain 8% profits, whether with copy trade or another option, the company is befunding

Proje bilgisi

Bütçe
30 - 200 USD
KDV (21%): 6.3 - 42 USD
Toplam: 36.3 - 242 USD
Geliştirici için
27 - 180 USD
Son teslim tarihi
from 1 to 3 gün