0% found this document useful (0 votes)
40 views1 page

Indicator II

Uploaded by

chanderjagdish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views1 page

Indicator II

Uploaded by

chanderjagdish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

INDICATOR 2

(EMA 13 & 34 CROSSOVER)

// This source code is subject to the terms of the Mozilla Public License 2.0 at
https://mozilla.org/MPL/2.0/
// © niharman98

//@version=5

strategy("My strategy", overlay=true, margin_long=100, margin_short=100)


timePeriod = time >= timestamp(syminfo.timezone, 2020, 12, 15, 0, 0)

ema1 =ta.ema(close, 13)


ema2 =ta.ema(close, 34)

plot(ema1, color=color.new(color.red, 13), linewidth=2, offset=2)


plot(ema2, color=color.new(color.green, 34), linewidth=2, offset=2)

longCondition = ta.crossover(ta.ema(close, 13), ta.ema(close, 34))


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

shortCondition = ta.crossunder(ta.ema(close, 13), ta.ema(close, 21))


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

You might also like