CryptoRox

HeikenAshi[1]

1762 4 304
This is the alert script so you can automate this strategy using AutoView:


Make sure to use
crossing down value 0.9 once per bar (on condition) for this.

For the alert Message if you're using AutoView:

Long GBPUSD            
c=order b=short
c=position b=short l=200 t=market
b=long q=0.01 l=200 t=market tp=60 sl=60

Short GBPUSD            
c=order b=long
c=position b=long l=200 t=market
b=short q=0.01 l=200 t=market tp=60 sl=60
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study("HeikenAshi[1]", title="Study", overlay=false)

//Heiken Ashi Candles
Factor = 3
Pd = 7
isHA = input(true, "HA Candles", bool)

data = isHA ? heikenashi(tickerid) : tickerid
res = input("180", "Resolution", resolution)

o = security(data, res, open[1])
c = security(data, res, close[1])
h = security(data, res, low[1])
l = security(data, res, high[1])

long = c > o
short = c < o

last_long = long ? time : nz(last_long[1])
last_short = short ? time : nz(last_short[1])

long_signal = crossover(last_long, last_short)
short_signal = crossover(last_short, last_long)

plot(long_signal, "Long", color=green)
plot(short_signal, "Short", color=red)
Pls, I have issue where to specify market data (position size, direction, etc...) when not using autoview... My broker is FXCM which is included in TV... Dont know where and how to compile data /wo using autoview... Thx.
Reply
Hi Crypto-rOX,

May I ask what the ''Factor'' and ''Pd'' variables refer to?

Thanks in advance.
Reply
are we using crossing down value 0.9 for both longs AND shorts?
Reply
CryptoRox 2x-Short
Yes sir. Because the alerts have their ow script using little spikes we are able to set the alerts the same depending on the color of the spike. Normally we do greater than, but because of the Heiken Ashi in the script, only crossing down on condition is reliable. The alert actually seems to fire a little sooner this way as it's firing at the end of the candle, rather then the open of the next, which unfortunately sometimes has some lag.
http://prntscr.com/9nfmkj

I have not monitored this strategy since the post, so maybe you should monitor it for a week or 2 in the strategy tester and play around before going live. It was more to get the HA candles and no pyramiding code out there. Just a heads up. Good Luck
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out