3rs Wave tradingview indicator to mt4

MQL4 指标 专家

指定

I need someone who is able to convert Lonesometheblue's 3rdWave tradingview indicator from to an EA/Indicator. The indicator works very well but it only alerts buy or sell in tradingview, I need it to also alert the price of the beginning of wave 0 and 2 to use them as SL when automating the strategy. The ideal would be to make an EA with its own alerts of the indicator but the basic thing is to make some function that returns the value of "0" and "2" that are painted on the graph in order to be able to take them as a reference for the value of the SL to automate with an external EA.

Public 3rd Wave code script: 

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © LonesomeTheBlue

//@version=5
indicator('3rd Wave', overlay=true, max_bars_back=500, max_lines_count=500, max_labels_count=500)
 
// import necessary functions to calculate and show the zigzag
import LonesomeTheBlue/CreateAndShowZigzag/1 as ZigZag

prd = input.int(defval=8, title='ZigZag Period', minval=2, maxval=50, group='setup')
ret_rate_min = input.float(defval=0.382, title='Min/Max Retracements', minval=0.100, maxval=0.900, inline='retrate', group='setup')
ret_rate_max = input.float(defval=0.786, title='', minval=0.100, maxval=0.900, inline='retrate', group='setup')
checkvol_support = input.bool(defval=true, title='Check Volume Support', group='setup')
target1_enb = input.bool(defval=true, title='Target 1', inline='t1', group='targets')
target1_ret = input.float(defval=1., title='', inline='t1', group='targets', tooltip = "%X of wave 1 from the begining of wave 2")
target2_enb = input.bool(defval=true, title='Target 2', inline='t2', group='targets')
target2_ret = input.float(defval=1.618, title='', inline='t2', group='targets', tooltip = "%X of wave 1 from the begining of wave 2")
target3_enb = input.bool(defval=false, title='Target 3', inline='t3', group='targets')
target3_ret = input.float(defval=2.618, title='', inline='t3', group='targets', tooltip = "%X of wave 1 from the begining of wave 2")
target4_enb = input.bool(defval=false, title='Target 4', inline='t4', group='targets')
target4_ret = input.float(defval=3.618, title='', inline='t4', group='targets', tooltip = "%X of wave 1 from the begining of wave 2")
showwave12 = input.bool(defval=true, title='Show Wave 1 and 2', group='colors')
showbo = input.bool(defval=true, title='Zone', inline='bocol', group='colors')
bupcol = input.color(defval=color.rgb(0, 255, 0, 85), title='', inline='bocol', group='colors')
bdncol = input.color(defval=color.rgb(255, 0, 0, 85), title='', inline='bocol', group='colors')
showzigzag = input.bool(defval=false, title='Zig Zag', inline='zzcol', group='colors')
upcol = input.color(defval=color.lime, title='', inline='zzcol', group='colors')
dncol = input.color(defval=color.red, title='', inline='zzcol', group='colors')

// definitions for zigzag arrays
var max_array_size = 10 // max length for zigzag array
var zigzag = array.new_float(0)
oldzigzag = array.copy(zigzag) // keep old zigzag

// get the zigzag
dir = ZigZag.getZigzag(zigzag, prd, max_array_size)
// show the zigzag
if showzigzag
    ZigZag.showZigzag(zigzag, oldzigzag, dir, upcol, dncol)


int len = array.size(zigzag) >= 8 ? bar_index - math.round(array.get(zigzag, 7)) : 1
bool vol_support = (not checkvol_support or (checkvol_support and ta.linreg(volume, len, 0) - ta.linreg(volume, len, 1) > 0))
var bool can_check_it = true
bool thereisbo = false
if (dir != dir[1])
    can_check_it := true
    can_check_it

// check if there is possible 3rd wave and show breakout if there is any
if array.size(zigzag) >= 8 and can_check_it
    w12 = math.abs(array.get(zigzag, 2) - array.get(zigzag, 4)) / math.abs(array.get(zigzag, 4) - array.get(zigzag, 6))
    if w12 >= ret_rate_min and w12 <= ret_rate_max and (dir == 1 and high > array.get(zigzag, 4) or dir == -1 and low < array.get(zigzag, 4))
        can_check_it := false
        if vol_support
            thereisbo := true
            // draw bo
            if showbo
                box.new(left=math.round(array.get(zigzag, 7)), top=array.get(zigzag, 4), right=bar_index, bottom=array.get(zigzag, 6), border_color=color.blue, border_width=1, border_style=line.style_dotted, bgcolor=dir == 1 ? bupcol : bdncol)
           
            if showwave12
                line.new(x1=math.round(array.get(zigzag, 7)), y1=array.get(zigzag, 6), x2=math.round(array.get(zigzag, 5)), y2=array.get(zigzag, 4))
                line.new(x1=math.round(array.get(zigzag, 5)), y1=array.get(zigzag, 4), x2=math.round(array.get(zigzag, 3)), y2=array.get(zigzag, 2))
                label.new(x=math.round(array.get(zigzag, 7)), y=array.get(zigzag, 6), text='0', color=color.new(color.white, 100), textcolor=color.blue, style=dir == 1 ? label.style_label_up : label.style_label_down)
                label.new(x=math.round(array.get(zigzag, 5)), y=array.get(zigzag, 4), text='1', color=color.new(color.white, 100), textcolor=color.blue, style=dir == 1 ? label.style_label_down : label.style_label_up)
                label.new(x=math.round(array.get(zigzag, 3)), y=array.get(zigzag, 2), text='2', color=color.new(color.white, 100), textcolor=color.blue, style=dir == 1 ? label.style_label_up : label.style_label_down)
   
            // draw label
            label.new(x=bar_index, y=array.get(zigzag, 6), color=dir == 1 ? upcol : dncol, style=dir == 1 ? label.style_triangleup : label.style_triangledown, size=size.small)
   
            base = array.get(zigzag, 2)
            wave1 = math.abs(array.get(zigzag, 4) - array.get(zigzag, 6))
            if target1_enb
                line.new(x1=bar_index, y1=math.max(base + dir * wave1 * target1_ret, 0), x2=math.round(array.get(zigzag, 7)), y2=math.max(base + dir * wave1 * target1_ret, 0), style=line.style_dashed)
            if target2_enb
                line.new(x1=bar_index, y1=math.max(base + dir * wave1 * target2_ret, 0), x2=math.round(array.get(zigzag, 7)), y2=math.max(base + dir * wave1 * target2_ret, 0), style=line.style_dashed)
            if target3_enb
                line.new(x1=bar_index, y1=math.max(base + dir * wave1 * target3_ret, 0), x2=math.round(array.get(zigzag, 7)), y2=math.max(base + dir * wave1 * target3_ret, 0), style=line.style_dashed)
            if target4_enb
                line.new(x1=bar_index, y1=math.max(base + dir * wave1 * target4_ret, 0), x2=math.round(array.get(zigzag, 7)), y2=math.max(base + dir * wave1 * target4_ret, 0), style=line.style_dashed)

alertcondition(thereisbo and dir ==  1, title = "Breakout Long",  message = "Breakout Long")
alertcondition(thereisbo and dir == -1, title = "Breakout Short", message = "Breakout Short")


Public  import LonesomeTheBlue/CreateAndShowZigzag/1 as ZigZag:

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © LonesomeTheBlue

//@version=5

// @description Functions in this library creates/updates zigzag array and shows the zigzag
library("CreateAndShowZigzag")

Trz(float [] zigzag, int mLoc)=>
    for x = array.size(zigzag) - 1 to array.size(zigzag) > 1 ? 0 : na by 2
        if bar_index - array.get(zigzag, x) <= mLoc
            break
        array.pop(zigzag)
        array.pop(zigzag)

addtozigzag(float [] zigzag, float value) =>
    array.unshift(zigzag, bar_index)
    array.unshift(zigzag, value)

updatezigzag(float [] zigzag, float value, int dir) =>
    if array.size(zigzag) == 0
        addtozigzag(zigzag, value)
    else
        if dir == 1 and value > array.get(zigzag, 0) or dir == -1 and value < array.get(zigzag, 0)
            array.set(zigzag, 0, value)
            array.set(zigzag, 1, bar_index)

export getZigzag(float [] zigzag, int prd, int mLoc)=>
    Trz(zigzag, mLoc)
    float ph = ta.highestbars(high, prd) == 0 ? high : na
    float pl = ta.lowestbars(low, prd) == 0 ? low : na
    var int dir = 0
    dir := ph and na(pl) ? 1 :
           pl and na(ph) ? -1 :
           dir
    bool bothexist = ph and pl
    bool dirchanged = dir != dir[1]
    if ph or pl
        if bothexist
            updatezigzag(zigzag, dir == 1 ? ph : pl, dir)
            dir := -dir
            addtozigzag(zigzag, dir == 1 ? ph : pl)
        else
            if dirchanged  //and not nz(bothexist[1], false)
                addtozigzag(zigzag, dir == 1 ? ph : pl)
            else
                updatezigzag(zigzag, dir == 1 ? ph : pl, dir)
    [dir, bothexist]

export showZigzag(float [] zigzag, float [] zigzagold, int dir, bool specialcase, color upcol, color dncol)=>
    var line zzline = na
    if specialcase
        line.set_xy1(zzline, math.round(array.get(zigzag, 3)), array.get(zigzag, 2))
    if array.get(zigzag, 0) != array.get(zigzagold, 0) or array.get(zigzag, 1) != array.get(zigzagold, 1)
        if array.get(zigzag, 2) == array.get(zigzagold, 2) and array.get(zigzag, 3) == array.get(zigzagold, 3)
            line.delete(zzline)
        zzline := line.new(x1=math.round(array.get(zigzag, 1)), y1=array.get(zigzag, 0), x2=math.round(array.get(zigzag, 3)), y2=array.get(zigzag, 2), color=dir == 1 ? upcol : dncol)

export getTN()=>
    int TN = 8
    tick__ = syminfo.mintick
    while tick__ < 1
        TN += 1
        tick__ *= 10
    tick__ := high
    while tick__ > 1
        TN += 1
        tick__ /= 10
    TN


反馈

1
开发者 1
等级
(252)
项目
570
36%
仲裁
64
20% / 58%
逾期
147
26%
空闲
2
开发者 2
等级
(558)
项目
925
48%
仲裁
301
59% / 25%
逾期
123
13%
已载入
3
开发者 3
等级
项目
0
0%
仲裁
0
逾期
0
空闲
4
开发者 4
等级
(5)
项目
6
33%
仲裁
1
0% / 0%
逾期
2
33%
已载入
5
开发者 5
等级
(276)
项目
414
63%
仲裁
5
40% / 0%
逾期
4
1%
工作中
相似订单
can we create an EA history reader that generates a trading logic? For example, when I want to find a good set of numbers for a system including MA20, price action, H1 time frame, it will automatically run to find the optimal set of numbers in terms of time, SL/TP..... Or simply if I don't use any indicator, just use price action and it will read history and give consistent trading logic, for example: 20:00, candle >
I need a trade manager with lot of complicated options and best ui. integrate with Telegram. And I needed for MT4 and MT5 both. Need a good developer with reasonable price
Please don’t just say Ho to me, explain me how you are going to do this job. you Hello I already use the account protection, but someone I feel like it is not protected. I saw some EA use License and DLL protection. I just need a better protection for my EA
Hi, Coding Skills Required: Experience in coding trading robots for MT5. Ability to implement increasing coefficients for the distance between orders and lot size 1. Project Objective: Develop an automated trading robot for MetaTrader 5 (MT5) as per the specified trading strategy. 2. Trading Strategy: The robot must execute a strategy that includes the following elements: Opening initial orders. Placing pending
Hello. Please find file attached. All described there. This is an averaging down expert advisor which is already completed that needs to modify. Hope you can help me with this
If you have any EA based on indicators, money management, martingale, hedging, pyramiding, etc. that can be used to save a position gone wrong, I am interested in buying that code. Basically, I need an ea/system to recovery positions that are in the red. The task is as follow: Use XAUUSD as reference, and enter 2 lots in short and 2 lots in long, wait for one of the positions to be 6,000 points in the red (about
Hey I am writing to a proficient algorithm trading bot developer who is well vast and can program EA for various trading platforms such as MT4, MT5, CTRADER AND TRADINGVIEW, I've been discussion the project specifications with an expert specialist here in few hours ago and that's when I first posted this job as it's very important job but suddenly an error occurred and job got automatically deleted while the
I want a robot that can run autonomously on an index, say US30 index whereby I can set a simple strategy. I want to set limit orders that trigger every incremental X points. If the market is at 39,000 I want to sell X per point at Y incremental point intervals based on the index level. If X=1 and Y= 50 I'd expect the following to happen P=50 and L=400 The market rises to 39,050 I sell at (X) 1 unit per point and I
I have the Source code for an existing MT5 EA... need this converted to work on NinjaTrader 8. I believe the language will be C#. I need an expert.. I believe this will be a difficult assignment. Price is flexible. Time is of the essence. Prefer a programmer that understands Trading Futures and speaks/understands english Will send over Source Code for current MT5 EA once programmer has been accepted. Must show an
I want an EA to trade based on Support & Resistance, and also integrating Supply/Demand and Breakout strategy. EA will also need a set of risk management and position lot settings. Will want a trade panel to be included as well

项目信息

预算
30 - 60 USD
VAT (21%): 6.3 - 12.6 USD
总计: 36.3 - 72.6 USD
开发人员
27 - 54 USD