Creating Higher High, Higher low and Lower low, Lower High indicator

MQL5 Эксперты

Работа завершена

Время выполнения 1 день
Отзыв от заказчика
Makes your life easy Thank you for your knowledge
Отзыв от исполнителя
Very nice working experience

Техническое задание

This is a pinescript code that was written on trading view that create  HH,HL and LL,LH

I want this script to run also on MT5
You can go to tradingview to see how the code run


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

//@version=4
study("Higher High Lower Low Strategy", overlay =true, max_lines_count = 500)
lb = input(5, title="Left Bars", minval = 1)
rb = input(5, title="Right Bars", minval = 1)
showsupres = input(true, title="Support/Resistance", inline = "srcol")
supcol = input(color.lime, title ="", inline = "srcol")
rescol = input(color.red, title ="", inline = "srcol")
srlinestyle = input(line.style_dotted, title = "Line Style/Width", options = [line.style_solid, line.style_dashed, line.style_dotted], inline ="style")
srlinewidth = input(3, title = "", minval = 1, maxval = 5, inline ="style")
changebarcol = input(true, title="Change Bar Color", inline = "bcol")
bcolup = input(color.blue, title ="", inline = "bcol")
bcoldn = input(color.black, title ="", inline = "bcol")

ph = pivothigh(lb, rb)
pl = pivotlow(lb, rb)

hl = iff(ph, 1, iff(pl, -1, na)) // Trend direction
zz = iff(ph, ph, iff(pl, pl, na)) // similar to zigzag but may have multiple highs/lows
zz :=iff(pl and hl == -1 and valuewhen(hl, hl, 1) == -1 and pl > valuewhen(zz, zz, 1), na, zz)
zz :=iff(ph and hl == 1 and valuewhen(hl, hl, 1) == 1 and ph < valuewhen(zz, zz, 1), na, zz)

hl := iff(hl==-1 and valuewhen(hl, hl, 1)==1 and zz > valuewhen(zz, zz, 1), na, hl)
hl := iff(hl==1 and valuewhen(hl, hl, 1)==-1 and zz < valuewhen(zz, zz, 1), na, hl)
zz := iff(na(hl), na, zz)

findprevious()=> // finds previous three points (b, c, d, e)
ehl = iff(hl==1, -1, 1)
loc1 = 0.0, loc2 = 0.0, loc3 = 0.0, loc4 = 0.0
xx = 0
for x=1 to 1000
if hl[x]==ehl and not na(zz[x])
loc1 := zz[x]
xx := x + 1
break
ehl := hl
for x=xx to 1000
if hl[x]==ehl and not na(zz[x])
loc2 := zz[x]
xx := x + 1
break
ehl := iff(hl==1, -1, 1)
for x=xx to 1000
if hl[x]==ehl and not na(zz[x])
loc3 := zz[x]
xx := x + 1
break
ehl := hl
for x=xx to 1000
if hl[x]==ehl and not na(zz[x])
loc4 := zz[x]
break
[loc1, loc2, loc3, loc4]

float a = na, float b = na, float c = na, float d = na, float e = na
if not na(hl)
[loc1, loc2, loc3, loc4] = findprevious()
a := zz
b := loc1
c := loc2
d := loc3
e := loc4

_hh = zz and (a > b and a > c and c > b and c > d)
_ll = zz and (a < b and a < c and c < b and c < d)
_hl = zz and ((a >= c and (b > c and b > d and d > c and d > e)) or (a < b and a > c and b < d))
_lh = zz and ((a <= c and (b < c and b < d and d < c and d < e)) or (a > b and a < c and b > d))

plotshape(_hl, text="HL", title="Higher Low", style=shape.labelup, color=color.lime, textcolor=color.black, location=location.belowbar, offset = -rb)
plotshape(_hh, text="HH", title="Higher High", style=shape.labeldown, color=color.lime, textcolor=color.black, location=location.abovebar, offset = -rb)
plotshape(_ll, text="LL", title="Lower Low", style=shape.labelup, color=color.red, textcolor=color.white, location=location.belowbar, offset = -rb)
plotshape(_lh, text="LH", title="Lower High", style=shape.labeldown, color=color.red, textcolor=color.white, location=location.abovebar, offset = -rb)

float res = na, float sup = na
res := iff(_lh, zz, res[1])
sup := iff(_hl, zz, sup[1])

int trend = na
trend := iff(close > res, 1, iff(close < sup, -1, nz(trend[1])))

res := iff((trend == 1 and _hh) or (trend == -1 and _lh), zz, res)
sup := iff((trend == 1 and _hl) or (trend == -1 and _ll), zz, sup)
rechange = res != res[1]
suchange = sup != sup[1]

var line resline = na
var line supline = na
if showsupres
if rechange
line.set_x2(resline, bar_index)
line.set_extend(resline, extend = extend.none)
resline := line.new(x1 = bar_index - rb, y1 = res, x2 = bar_index, y2 = res, color = rescol, extend = extend.right, style = srlinestyle, width = srlinewidth)
if suchange
line.set_x2(supline, bar_index)
line.set_extend(supline, extend = extend.none)
supline := line.new(x1 = bar_index - rb, y1 = sup, x2 = bar_index, y2 = sup, color = supcol, extend = extend.right, style = srlinestyle, width = srlinewidth)

barcolor(color = iff(changebarcol, iff(trend == 1, bcolup, bcoldn), na))


Откликнулись

1
Разработчик 1
Оценка
(8)
Проекты
23
30%
Арбитраж
1
0% / 0%
Просрочено
1
4%
Загружен
2
Разработчик 2
Оценка
(45)
Проекты
61
15%
Арбитраж
1
0% / 0%
Просрочено
6
10%
Загружен
3
Разработчик 3
Оценка
(1)
Проекты
1
0%
Арбитраж
0
Просрочено
1
100%
Свободен
4
Разработчик 4
Оценка
(125)
Проекты
146
23%
Арбитраж
5
0% / 60%
Просрочено
4
3%
Работает
5
Разработчик 5
Оценка
(252)
Проекты
570
36%
Арбитраж
64
20% / 58%
Просрочено
147
26%
Свободен
6
Разработчик 6
Оценка
(251)
Проекты
402
38%
Арбитраж
82
41% / 20%
Просрочено
70
17%
Загружен
7
Разработчик 7
Оценка
(281)
Проекты
421
63%
Арбитраж
5
40% / 0%
Просрочено
4
1%
Свободен
8
Разработчик 8
Оценка
(4)
Проекты
10
10%
Арбитраж
6
0% / 67%
Просрочено
1
10%
Занят
9
Разработчик 9
Оценка
(562)
Проекты
929
48%
Арбитраж
301
59% / 25%
Просрочено
123
13%
Загружен
10
Разработчик 10
Оценка
(41)
Проекты
87
13%
Арбитраж
29
31% / 48%
Просрочено
35
40%
Занят
Похожие заказы
Bom dia, O filtro de notícias do meu EA deixou de funcionar. Algum especialista para trabalhar no filtro de notícias? A ideia é apenas eliminar ordens pendentes ou abertas alguns minutos antes da divulgação de notícias e voltar a abrir alguns minutos depois da divulgação das notícias. Obrigado e cumprimentos, Nelson Dias
Trend follower 30 - 70 USD
Hey design for me an EA by the name of the trend follower on MT5 The EA will work on all timeframe, detect signals, trade and send them on telegram. The EA will have to detect the general trend first, then detect the signal that will follow the trend. After trend detection, EA will generate signals will be detected will be generated and send on telegram as trading zone. 1 Trend detection EA has to detect general
I need an Expert Advisor that can read trade signals from a Telegram Channel and then execute those trades. My telegram bot has admin access to the Telegram Channel The EA needs the following functionality: Position Size: Auto: + Have fixed lot size set in settings. + Have lot size by % of account (set in settings) Manual: + From lot size set in trade signals message. + From lot size by % of account from trade
Before you apply please read my terms This Job has been handle by two different coder and i have a copy of the code they provided right now on my vps The Job was cancel because it doesn't work as specify As a result of this i will require you provide a code that open and close before we lock the entire fund Let assume your fees is $40 or $60 or etc i will first upload requirement with $30 for you to start coding you
Hedging strategy with Moving Average along with other parameters and Conditions Expert Adviser (EA) – MQL 5 Main Parameters – Moving Average trend order, Hedging opposite order, Average and double average loss order, Stop Loss Strategy, No. of Open Buy and Sell Orders and another important 2 things are .. Exit Strategy & Pip gap between order Please note this EA .. it is a combination of new orders along with
Good day, I´m looking for an EA to execute outputs/signals from an Indicator. The options/settings should be like : open trades for TP1 / TP2 / TP3 ( incl SL ) TrailingStop by reaching certain TP´s option for closing trades by opposite signal (true/false) Money management: Fixed lot Risk by % Autlot and maybe some other ideas from your side to make it easier and more safe
The ZONE RECOVERY/HEDGING STRATEGY will be on a timeframe where each strategy is independent and pending orders should be placed at the high and low of the candlestick. If it is a buy, then the pending order at the high of the candlestick will be triggered, and if it is a sell, then the pending order at the low of the candlestick will be triggered. If the market breaks the high of the candlestick, then the pending
I NEED AN EXPERT ADVISOR BASED ON DIVERGENCE INDICATOR AND ORDER BLOCK INDICATOR.IT WILL USE ORDER BLOCK INDICATOR MAIN,SIGNAL AND CONFIRMATION CANDLES TO OPEN POSITIONS.IT WILL USE SOME DIFFERENT SETTINGS.TIME CONDITIONS,MULTIPLY SETTINGS,TRAILING STOP LOSS BREAKEVEN SETTING E.T.C.I WILL GIVE INDICATORS
Using a tradingview indicator Trend Indicator A (v2.3) to convert it into a Robot. Conditions as follows : Buy when the trend color is green, sell when trend color is red, set stop loss and take profits, risk to reward ratio 1:3 or when the trend color changes, whichever is best based on backtesting. You can add anything that will make the robot works better
hi I have a script in Tradingview that looks good which shows the buy and sell automation. I wanted to see if that can be used in ninja Trader so I converted it for Ninja Trader. But it is not triggering the buy or sell trade like it shows in the tradingview script. Please let me know if you can help me with the script that will work in Ninja Trader just like the one in Trading View. I have the buy and sell signals

Информация о проекте

Бюджет
30 - 70 USD
Исполнителю
27 - 63 USD