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
Оценка
(43)
Проекты
58
16%
Арбитраж
1
0% / 0%
Просрочено
6
10%
Загружен
3
Разработчик 3
Оценка
(1)
Проекты
1
0%
Арбитраж
0
Просрочено
1
100%
Свободен
4
Разработчик 4
Оценка
(120)
Проекты
141
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
Оценка
(277)
Проекты
415
63%
Арбитраж
5
40% / 0%
Просрочено
4
1%
Загружен
8
Разработчик 8
Оценка
(4)
Проекты
10
10%
Арбитраж
5
0% / 80%
Просрочено
1
10%
Занят
9
Разработчик 9
Оценка
(560)
Проекты
927
48%
Арбитраж
301
59% / 25%
Просрочено
123
13%
Загружен
10
Разработчик 10
Оценка
(41)
Проекты
87
13%
Арбитраж
30
30% / 47%
Просрочено
35
40%
Занят
Похожие заказы
### Detailed ICT Fair Value Gap Strategy for Developer **Objective**: Develop a profitable Inner Circle Trader (ICT) Fair Value Gap (FVG) strategy for the 1-minute and 5-minute time frames focused on four key ICT kill zones per day. ### Components: #### 1. Market Structure Identification: - **Swing Highs and Lows**: Automatically detect and plot swing highs and lows to understand market structure and trends. -
Persian 50+ USD
Hello, I want to trade on the gold chart using the trader robot in Metatrader 4 between 50 and 100 dollars in a week to check the result. I want a free robot to test
Strategy To Be Used 1. Order Blocks (4HR, Daily And Weekly) 2. FVG (For Entry) 3. Fibonacci Levels (TP) 4. HH/LL ( SL) Works in 1HR & 4HR (TF) Risk to reward minimum 2:1 (Default) Winrate 53.21% (Accuracy) tested on Live account of 1000$ May 14th to May 31st You can change the risk per trade percent Per day DD Limit *it should takes multiple entries at the same price point when the price touches weekly/ daily
i need to add some functions to existing indicator, so i need to create a new one with a panel, fixing repaint and i would see some informations on chart
I want to develop a NinjaTrader automated strategy that has a high win rate for trading futures. So the strategy will automatically enter and exit for an account. Do you have any experience with this? If so, can you please share some past results? I want to develop the ICT Silver Bullet strategy to trade futures with Ninjascript. Please reference the attached document for a briefing. Let me know if this is something
Find a good Indicator 30 - 100 USD
As the title says, I need to find an Indicator with the function of scanning Accurate SMC signals on backtest with a nice control panel and can report signals to phone/email. Includes source code and export license for business. Please send Demo or pictures
Our current EA .ex4 file was earlier compatible with all mt4 updates, however in the recent 1420 update it’s not running, we need to make the same EA compatible with the current mt4 version, we only have the .ex4 file, no mql4 file
HI i am looking for any EA which can get me 10 to 15 trades Daily With $1 to $3 SL with 1: 2 Profit Ratio. Any Strategy will do. Say if if are getting 3USD SL and 5USD Profit with 50 % Winning Ration or $2 SL and 3$ Profit With 50% Winning Ratio. or 2$ SL and 10$ Profit 30% Wining Ration
### Strategy Description for Developer: **Objective**: Develop a profitable Inner Circle Trader (ICT) strategy for the 1-minute and 5-minute time frames. **Components**: 1. **Market Structure**: Identify market structure using swing highs and lows. 2. **Order Blocks**: Utilize bullish and bearish order blocks for potential entry points. 3. **Fair Value Gaps**: Use Fair Value Gaps (FVG) as alternative or complementary
Hello, I am looking for a partner who can create an Expert Advisor in MQL5 to trade my own range breakout strategy. In the attached file you will find the strategy and the functions that the EA must cover. Thank you

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

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