返回博客
Tutoriales March 30, 2026

📈 Tutorial #1: Cruce de Medias Móviles (Tendencia)

La madre de todas las estrategias de tendencia. Aprendé a automatizar el cruce de 9/21 con DearmasTrader.

ED

Emmanuel Dearmas

DearmasTrader Team

📈 Tendencia: Esta estrategia es ideal para mercados con movimientos claros. Atrapá el inicio de la tendencia en milisegundos.

¿Cómo funciona?

El cruce de una media rápida (EMA 9) sobre una lenta (EMA 21) indica un cambio de momentum. Automatizarlo con Webhooks elimina la duda y el retraso manual.

📄 Pine Script (Full Code)

//@version=6
strategy("DMT - EMA Cross 9/21", overlay=true)
token = input.string("TOKEN_DMT", "DMT Token")

long  = ta.crossover(ta.ema(close, 9), ta.ema(close, 21))
short = ta.crossunder(ta.ema(close, 9), ta.ema(close, 21))

if (long)
    strategy.entry("Long", strategy.long, alert_message='{"action": "OPEN", "direction": "LONG", "pair": "' + syminfo.ticker + '", "token": "' + token + '"}')
if (short)
    strategy.entry("Short", strategy.short, alert_message='{"action": "OPEN", "direction": "SHORT", "pair": "' + syminfo.ticker + '", "token": "' + token + '"}')
      

准备好应用所学知识了吗?

在演示模式下免费测试我们的策略。

创建免费账户