Heiken Ashi + Ichimoku System

Forums ProRealTime English forum ProOrder support Heiken Ashi + Ichimoku System

Viewing 6 posts - 1 through 6 (of 6 total)
  • #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”)

    #85589

    Topic 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/

    #85746

    Why not, but does the strategy really have this gain progression in real time? I ask that because it is well known that TradingView Heikin Ashi backtests are not reliable..

    #85960

    yes i think that u are right i tried to backtest it with regular candles and it didn,’t worked

    thanks any way nicolas

    #85961

    i 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 = close
    RSIMain = (rsi(xPrice, RSIPeriod) – 50) * RSIHistoModify
    rsiHcolor = 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)
    #85972

    Please 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

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login