Skip to main content
Latest Crypto Fear & Greed Index


New Pine Script: EMA Cross


This is a simple momentum strategy. Buy on EMA cross over, sell on EMA cross under. The fast length is EMA 29, the slow length is EMA 2100.  

Strategy Description: EMA29 crossover EMA2100

Expected potential ROI Monthly (in sideway/bullish market): 20%

Recommended Settings:

Pair: BTCUSDT

Time frame: 5min

Initial Capital: 100

Base Currency: Default

Order Size: 100% equity

Pyramiding: 1

Commission: 0.1 %

Exit strategy: EMA cross under

Take Profit: -

Stop Loss: -

//@version=4
strategy("EMA29crossEMA2100[www.capayam.com]", overlay=true)

// Define the inputs
ema29Length = input(29, title="EMA 29 Length")
ema2100Length = input(2100, title="EMA 2100 Length")

// Calculate the indicators
ema29 = ema(close, ema29Length)
ema2100 = ema(close, ema2100Length)

// Define the entry conditions
enterLong = crossover(ema29, ema2100)

// Define the exit conditions
exitLong = crossunder(ema29, ema2100)

// Execute the strategy
if (enterLong)
    strategy.entry("Buy", strategy.long)
if (exitLong)
    strategy.close("Buy")

Comments