Need a quick conversion of an indicator to MT4 indicator

MQL4 インディケータ 変換

仕事が完了した

実行時間6 日

指定

//@version=5
indicator("The LI",overlay=true,max_lines_count = 500, max_labels_count = 500)

Mode2 = true
Mode3 = true
MaxLines = input(25)
RemoveLabelWhenLineIsBroken = input(true)

LineC1 = input.color(color.black,"High Line",inline='l1',group="UI Settings")
LineT1 = input.string("Solid","Style",options=["Solid","Dashed","Dotted"],inline='l1',group="UI Settings")
LineW1 = input.int(1,"Width",minval=1,inline='l1',group="UI Settings")

LineC2 = input.color(color.black,"Low Line",inline='l2',group="UI Settings")
LineT2 = input.string("Solid","Style",options=["Solid","Dashed","Dotted"],inline='l2',group="UI Settings")
LineW2 = input.int(1,"Width",minval=1,inline='l2',group="UI Settings")

HighLabel = input.string("xcross",options=["none","xcross","cross","circle","diamond","square","flag" ,"arrowdown","arrowup","triangleup","triangledown"],group="UI Settings",inline='hl1')
Color1 = input(color.red,"",inline='hl1',group="UI Settings")
LowLabel = input.string("xcross",options=["none","xcross","cross","circle","diamond","square","flag" ,"arrowdown","arrowup","triangleup","triangledown"],group="UI Settings",inline='hl2')
Color2 = input(color.red,"",inline='hl2',group="UI Settings")
LabelSize = input.string("Auto",options=["Auto","Huge","Large","Normal","Small","Tiny"],group="UI Settings")

LineText1 = input.string("","High Text",inline='lt1',group="Line Text")
LineTextColor1 = input.color(color.red,"",inline='lt1',group="Line Text")
LineTextAlign1 = input.string("Center","Align",options=['Center','Left','Right'],inline='lt1',group="Line Text")
LineTextSize1 = input.string("Normal","Size",options=["Auto","Huge","Large","Normal","Small","Tiny"],inline='lt1',group="Line Text")

LineText2 = input.string("","Low Text",inline='lt2',group="Line Text")
LineTextColor2 = input.color(color.red,"",inline='lt2',group="Line Text")
LineTextAlign2 = input.string("Center","Align",options=['Center','Left','Right'],inline='lt2',group="Line Text")
LineTextSize2 = input.string("Normal","Size",options=["Auto","Huge","Large","Normal","Small","Tiny"],inline='lt2',group="Line Text")

LabelSizesToEnum(s) =>
    switch s
        "Auto" => size.auto
        "Huge" => size.huge
        "Large" => size.large
        "Normal" => size.normal
        "Small" => size.small
        "Tiny" => size.tiny

LabelStylesToEnum(s) =>
    switch s
        "xcross" => label.style_xcross
        "cross" => label.style_cross
        "circle" => label.style_circle
        "diamond" => label.style_diamond
        "square" => label.style_square
        "flag" => label.style_flag
        "arrowdown" => label.style_arrowdown
        "arrowup" => label.style_arrowup
        "triangleup" => label.style_triangleup
        "triangledown" => label.style_triangledown
        "none" => label.style_none
        
StyleToEnum(s) =>
    switch s
        "Solid" => line.style_solid
        "Dashed" => line.style_dashed
        "Dotted" => line.style_dotted

RedCandle = close < open
GreenCandle = close > open

StandHigh = high[1] >= high and high[1] >= high[2]
StandLow = low[1] <= low and low[1] <= low[2]

TFUpdateNeeded(tf) =>
    if timeframe.period == '1'
        ta.barssince(ta.change(time(tf))) == 0
    else
        v_xx1 = ta.barssince(ta.change(time(tf)) != 0 ? true : false)
        var float v_xx2 = na
        if v_xx1 == 0
            v_xx2 := v_xx1[1]
        v_xx2==v_xx1
    
var Levels = array.new<float>()
var Levels_t = array.new<int>()
var Levels_c = array.new<int>()

dt = time - time[1]

AddLevel(p,t,c) =>
    array.push(Levels,p)
    array.push(Levels_t,t)
    array.push(Levels_c,c)

if Mode2
    if StandHigh
        AddLevel(high[1],time[1],1)
        label.new(time[1],high[1],yloc=yloc.abovebar,xloc=xloc.bar_time,style=LabelStylesToEnum(HighLabel),size=LabelSizesToEnum(LabelSize),color=Color1)
        
    if StandLow
        AddLevel(low[1],time[1],2)
        label.new(time[1],low[1],yloc=yloc.belowbar,xloc=xloc.bar_time,style=LabelStylesToEnum(LowLabel),size=LabelSizesToEnum(LabelSize),color=Color2)
    
    
var int lastRed = 0
var int lastGreen = 0

if Mode3
    if GreenCandle[2]
        if high[2] > high[1] and low[2] > low
            i = 2
            label.new(time[i],high[i],yloc=yloc.abovebar,xloc=xloc.bar_time,style=LabelStylesToEnum(HighLabel),size=LabelSizesToEnum(LabelSize),color=Color1)
            array.push(Levels,high[i])
            array.push(Levels_t,time[i])
            array.push(Levels_c,1)
    
    
    if RedCandle[2]
        if low[2] < low[1] and high[2] < high
            i = 2
            label.new(time[i],low[i],yloc=yloc.belowbar,xloc=xloc.bar_time,style=LabelStylesToEnum(LowLabel),size=LabelSizesToEnum(LabelSize),color=Color2)
            array.push(Levels,low[i])
            array.push(Levels_t,time[i])
            array.push(Levels_c,2)


CandleIsTouching(x) =>
    low < x and high > x
    
DeleteLabelForline(l) =>
    bi = line.get_x1(l)
    a_allLabels = label.all
    if array.size(a_allLabels) > 0
    for i = 0 to array.size(a_allLabels) - 1
        lbl = array.get(a_allLabels, i)
        if label.get_x(lbl) == bi
        label.delete(lbl)

DrawText(t1,t2,p,txt,align,c,s) =>
    if str.length(txt) > 0
        len = math.abs(t1 - t2) / dt
        if align == 'Center'
            label.new(t1+len*dt/2,p,txt,xloc=xloc.bar_time,style=label.style_none,textcolor=c,textalign=text.align_center,size=s)
        else if align == 'Left'
            label.new(t1,p,txt,xloc=xloc.bar_time,style=label.style_none,textcolor=c,textalign=text.align_center,size=s)
        else if align == 'Right'
            label.new(t2,p,txt,xloc=xloc.bar_time,style=label.style_none,textcolor=c,textalign=text.align_center,size=s)

bool looper = true
varip int LastAlertT = 0
while looper
    looper := false
    if array.size(Levels) > 0
        for i = 0 to array.size(Levels) - 1
            lvl = array.get(Levels,i) 
            t = array.get(Levels_t,i) 
            c = array.get(Levels_c,i) 
            if CandleIsTouching(lvl)
                len = (time - t) / dt
                
                if len >= 1
                    ln = if c == 1
                        DrawText(t,time,lvl,LineText1,LineTextAlign1,LineTextColor1,LabelSizesToEnum(LineTextSize1))
                        line.new(t,lvl,time,lvl,xloc=xloc.bar_time,color=LineC1,style=StyleToEnum(LineT1),width=LineW1)
                    else if c == 2 
                        DrawText(t,time,lvl,LineText2,LineTextAlign2,LineTextColor2,LabelSizesToEnum(LineTextSize2))
                        line.new(t,lvl,time,lvl,xloc=xloc.bar_time,color=LineC2,style=StyleToEnum(LineT2),width=LineW2)
                    if RemoveLabelWhenLineIsBroken
                        DeleteLabelForline(ln)

                if time - LastAlertT > 1000*5
                    LastAlertT := time
                    if c == 1
                        alert(syminfo.ticker + " High Taken [" + timeframe.period + "]",alert.freq_all)
                    else
                        alert(syminfo.ticker + " Low Taken [" + timeframe.period + "]",alert.freq_all)
                    
                array.remove(Levels,i)
                array.remove(Levels_t,i)
                array.remove(Levels_c,i)
                looper := true
                break

if barstate.islast
    Arr = line.all
    
    while array.size(line.all) > MaxLines
        //remove the oldest line
        int oldT = na
        int OldIdx = na
        if array.size(Arr) > 0
            for i = 0 to array.size(Arr)-1
                l = array.get(Arr,i)
                lx1 = line.get_x1(l)
                if na(oldT)
                    oldT := lx1
                    OldIdx := i
                else
                    if oldT > lx1
                        oldT := lx1
                        OldIdx := i
            if not na(OldIdx)
                lbl = array.get(Arr,OldIdx)
                DeleteLabelForline(lbl)
                line.delete(lbl)

応答済み

1
開発者 1
評価
(56)
プロジェクト
92
62%
仲裁
0
期限切れ
4
4%
類似した注文
Convert Time Range Breakout Indicator to Strategy (Pine Script) I have an existing Time Range Breakout indicator on TradingView. I need a developer to convert it into a fully functional strategy with proper trade execution logic. Strategy Logic: Time Range: Define a specific time range (e.g., 03:00 – 04:30) During this time, the indicator marks the High and Low range Entry Conditions Buy when price touches the range
Hello, I’m looking for an experienced MQL4 developer to build a custom MT4 Expert Advisor based on a Koncorde-style indicator strategy. Here are the main requirements: 🔹 General Overview The EA must be a master EA , running on a single chart and managing multiple currency pairs simultaneously No need to attach EA to each chart Must support a configurable list of symbols 🔹 Indicator Requirement Develop a custom
I want to find a Developer to perform this work and settle payments in this Application. I undertake not to communicate with Applicants anywhere else except this Application, including third-party
Hi guys I’m looking for a coder who’s experienced in one script. The candidate must be familiar with fractals and self similarity. If you can’t code self similarity, please don’t bother contacting me ( respectfully). I just don’t want us to waste each others time. My budget is 100$. If that’s too low for you please, don’t contact me. Only contact me if you can code self similarity and can accept 100$. I will provide
I hope to acquire a profitable and existing expert advisor (EA) from the gold market, with complete source code, to add to our client portfolio. you can WECHAT: Faca7898 Please note EA when adding friends. It should be clarified that this does not require you to formulate or design new strategies. If you already have a verified, consistent, and production-ready EA, I am willing to purchase it immediately and engage
Core Requirements: Platform: MetaTrader 5 (MT5). Symbol: XAUUSD (Gold). Timeframes: M1 and M5 (user selectable). Trading Style: Scalping with controlled risk (not aggressive or high-risk strategies) -> adjustable, even better. Execution: Fast execution, optimized for gold market conditions. Frequence = adjustable, but there should be 10-20 trades per day. Strategy Logic: Use a reliable and conservative strategy
Eu preciso disso. A linha central do TMA (17,5,1.5) será a principal referência. Outra linha de média móvel (AVG) de 3 períodos decrescentes 2. As ordens serão as seguintes: abaixo, somente compra de TMA; acima, somente venda de TMA. O sinal de entrada será o seguinte: se o preço estiver acima da Média Móvel Tarifária (TMA), será apenas para venda; quando o preço se mantiver abaixo da Média Móvel Tarifária (AVG)
I am looking for non-repainting indicator to run in all sessions for scalping gold , happy to discuss if you have developed such indicators which can show profit and stop loss levels
Hello! I want to buy two indicators: A Support and Resistence Indicator and a Trendline Indicator. Support and Resistence Indicators needs to automatically draws Support and Resistance lines based on High and Low Candle in every time-frame (If possible time-frame needs to be in inputs and choose by me what time-frame i want indicator to draw lines) Trendline Indicator needs to automatically draws Trendline Channels
I need an experienced developer to carry out an indicator and trading robot using the following; moving averages risk ( take profit and stop loss) and maximum drawdown limits heiken ashi confirmation. trendline breakout if possible The developer will test this on a demo account that I will provide before conclusion as I don’t want anyone to waste my time trying to use chartgpt trial and error. If you can do the

プロジェクト情報

予算
30+ USD
締め切り
最高 1 日