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%
무료
비슷한 주문
I need an EA edited to make TWO main changes to conditions for how it enters trades. The EA code is written with clean code and is well commented. Will provide more info on changes in a doc in the chat
BUY AND SELL 30+ USD
Create an Expert Advisor that collaborates between these indicators ETR, MEv2 and STLv3 with these features 1. SL and TP 2. TIME FILTER 3. ETR, MEv2 and STLv3 PARAMETERS BUY ENTRY STEP 1. FIRST candle OPEN above Symphonie Trend Line STEP 2. Check Symphonie Extreme must indicate color BLUE STEP 3. Check Symphonie Emotion must indicate color BLUE STEP 4. Open trade with money management STEP 5. Trade open MUST BE 1
I have an EA that need some changes including integrating the indicator code directly into the Expert Advisor. I will give the detailed doc once we settle on the candidate for the job . Please bid if you can work with the stated amount. Thanks
Hello, Need to convert Tradingview Indicator to MQL4 indicator. or if you have this one converted already, let me buy a copy please. If we're good, then will definitely buy it and ask to convert into EA on new order. Supertrend by KivancOzbilgic
Fix bug or modify an existing Trading view indicator to display correct. The indicator is working but not displaying/plotting all the information i want. So i want it adjusted to plot all the info
Here's a brief requirement you can use: **Description:** I am seeking an experienced MQL5 developer to create a (EA). The EA should include features for placing pending orders (Buy Stop and Sell Stop) based on market spread, managing trades effectively at the opening of new candlesticks, and implementing take profit and stop loss strategies. Additionally, I would like the option to adjust parameters based on market
I have an EA which i need to do below modifications. Variable Inputs to be added Order Type : Market , Pending Trade Type : Buy, Sell , Buy & Sell Pending Pips Step : ( Pips Value can be negative or positive to decide on what type of Pending Order ) // If trade type Buy is selected Close Type : Close All ( Bulk Close Option in MT5 ) , Close Individually Close Option : %of Equity , %of Balance , Amount $ , %of No
Add multiplier to grid recovery system. For example: Grid Trade 2-3 Spacing; 1.0 Multiplier Grid Trade 4-6 Spacing; 2.0 Multiplier Grid Trade 7+ Spacing; 1.6 Multiplier Need quick turn around. Need it done ASAP
Objects reader PIN 70 - 100 USD
Hi I have an indicator that create objects in the chart and using those following some rules the new indicator will create external global variables with value = 0 ( NONE ), = 1 ( BUY ) or = 2 ( SELL ). The global variable will use PIN external integer number . PINS are by now global variables (GV) whose name indicates the pair name and the PIN belonging and their value indicates it direction/action. PINS GV names
I want an indicator and its source code that returns the value of: - two moving averages in different selectable timeframes, with method Exponential and price calculation price_open; - Opening, closing, maximum and minimum of the candle in different timeframes And that returns the values ​​regardless in a chart of one minute. The input parameters: * select timeframe media1 = {1,2,3,4,5,...} * select timeframe media2

프로젝트 정보

예산
30+ USD
개발자에게
27 USD
기한
 1 일