Heiken Ashi + Ichimoku System
Forums › ProRealTime English forum › ProOrder support › Heiken Ashi + Ichimoku System
- This topic has 5 replies, 3 voices, and was last updated 5 years ago by Nicolas.
Tagged: heiken ashi, ichimoku
-
-
11/20/2018 at 5:48 PM #85346
Please I want to convert this strategy from tradingView script to prorealcode script
//@version=3
strategy(“Heiken Ashi + Ichimoku Kinko Hyo Strategy”, shorttitle=”HaI”, overlay=true, default_qty_type=strategy.percent_of_equity, max_bars_back=1000, default_qty_value=100, calc_on_order_fills= true, calc_on_every_tick=true, pyramiding=0)
hahigh = security(heikinashi(tickerid), period, high)
halow = security(heikinashi(tickerid), period, low)TenkanSenPeriods = input(9, minval=1, title=”Tenkan Sen Periods”)
KijunSenPeriods = input(24, minval=1, title=”Kijun Sen Periods”)
SenkouSpanBPeriods = input(51, minval=1, title=”Senkou Span B Periods”)
displacement = input(24, minval=1, title=”Displacement”)
donchian(len) => avg(lowest(len), highest(len))
TenkanSen = donchian(TenkanSenPeriods)
KijunSen = donchian(KijunSenPeriods)
SenkouSpanA = avg(TenkanSen, KijunSen)
SenkouSpanB = donchian(SenkouSpanBPeriods)
SenkouSpanH = max(SenkouSpanA[displacement – 1], SenkouSpanB[displacement – 1])
SenkouSpanL = min(SenkouSpanA[displacement – 1], SenkouSpanB[displacement – 1])
ChikouSpan = close[displacement-1]plot(TenkanSen, color=blue, title=”Tenkan Sen”, linewidth = 2)
plot(KijunSen, color=maroon, title=”Kijun Sen”, linewidth = 3)
plot(close, offset = -displacement, color=orange, title=”Chikou Span”, linewidth = 2)
sa=plot (SenkouSpanA, offset = displacement, color=green, title=”Senkou Span A”, linewidth = 2)
sb=plot (SenkouSpanB, offset = displacement, color=red, title=”Senkou Span B”, linewidth = 3)
fill(sa, sb, color = SenkouSpanA > SenkouSpanB ? green : red)longCondition = hahigh > max(hahigh[1],hahigh[2]) and close>ChikouSpan and close>SenkouSpanH and (TenkanSen>=KijunSen or close>KijunSen)
if (longCondition)
strategy.entry(“Long”,strategy.long)shortCondition = halow < min(halow[1],halow[2]) and close if (shortCondition)
strategy.entry(“Short”,strategy.short)closelong = halow < min(halow[1],halow[2]) and (TenkanSen max(hahigh[1],hahigh[2]) and (TenkanSen>KijunSen or close>SenkouSpanA or close>KijunSen or close>SenkouSpanL or close>ChikouSpan)
if (closeshort)
strategy.close(“Short”)11/23/2018 at 3:38 PM #85589Topic moved from French forum to English Forum, please use same language as chosen forum, thank you, as well as guidelines for free code conversion (explanation of indicator, screenshot of what it looks like on graph) as per rules in following link, thank you https://www.prorealcode.com/free-code-conversion/
11/26/2018 at 3:11 PM #8574611/29/2018 at 1:01 AM #85960yes i think that u are right i tried to backtest it with regular candles and it didn,’t worked
thanks any way nicolas
11/29/2018 at 1:03 AM #85961i have another indicator that i want to concert
////////////////////////////////////////////////////////////// Copyright by HPotter v1.0 07/08/2014// This simple indicator modified RSI// You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect…////////////////////////////////////////////////////////////study(title=”RSI HistoAlert Strategy”)RSIPeriod = input(13, minval=1)BuyAlertLevel = input(-10)SellAlertLevel = input(10)RSIHistoModify = input(1.5)hline(0, color=purple, linestyle=line)hline(BuyAlertLevel, color=green, linestyle=dashed)hline(SellAlertLevel, color=red, linestyle=dashed)xPrice = closeRSIMain = (rsi(xPrice, RSIPeriod) – 50) * RSIHistoModifyrsiHcolor = iff(RSIMain >= 0 , green,iff(RSIMain < 0, red, black))pos =iff(RSIMain > BuyAlertLevel, 1,iff(RSIMain < SellAlertLevel, -1, nz(pos[1], 0)))barcolor(pos == -1 ? red: pos == 1 ? green : blue )plot(RSIMain, color=blue, title=”RSI HistoAlert”)plot(RSIMain, color=rsiHcolor, title=”Histogram”, style = histogram, linewidth = 1)11/29/2018 at 8:57 AM #85972Please use the dedicated form to ask for a free code conversion and follow the rules described in its page: Ask for a free code conversion
-
AuthorPosts
Find exclusive trading pro-tools on