Page 167 of 183

Re: Trend Indicators for MT4

Posted: Sat Sep 14, 2024 7:06 pm
by ChuChu Rocket
AryaAryaee wrote: Sat Sep 14, 2024 7:04 pm oh! it is Pacmola,s? sorry i tought it is yours! then i could ask Pacmola
Yes I quoted him so hopefully he replies soon!

Re: Trend Indicators for MT4

Posted: Sat Sep 14, 2024 7:23 pm
by AryaAryaee
ChuChu Rocket wrote: Sat Sep 14, 2024 7:06 pm Yes I quoted him so hopefully he replies soon!
Thankyou Dear!

Re: Trend Indicators for MT4

Posted: Sun Sep 15, 2024 1:54 am
by Pucmola
AryaAryaee wrote: Sat Sep 14, 2024 7:04 pm oh! it is Pacmola,s? sorry i tought it is yours! then i could ask Pacmola
The full version already has an owner, this basic - I can't publish it, sorry.
But, we are in the Trend thread, so I have approx. 30 minutes of time. I'll think of something for you. See you in half an hour...



edit:
set... it's just according to my preferences... everything can be set there according to your trading style
ENJOY

Re: Trend Indicators for MT4

Posted: Sun Sep 15, 2024 1:58 am
by AryaAryaee
Pucmola wrote: Sun Sep 15, 2024 1:54 am The full version already has an owner, this basic - I can't publish it, sorry.
But, we are in the Trend thread, so I have approx. 30 minutes of time. I'll think of something for you. See you in half an hour...
Nop! I got you! thankyou

Re: Trend Indicators for MT4

Posted: Sun Sep 15, 2024 3:27 am
by AryaAryaee
Pucmola wrote: Sun Sep 15, 2024 1:54 am The full version already has an owner, this basic - I can't publish it, sorry.
But, we are in the Trend thread, so I have approx. 30 minutes of time. I'll think of something for you. See you in half an hour...



edit:
set... it's just according to my preferences... everything can be set there according to your trading style
ENJOY
Thankyou Pucmola ! it is appreciated! i will try it soon

Re: Trend Indicators for MT4

Posted: Fri Sep 20, 2024 4:46 pm
by trader2000
muhammadFarooq2k20 wrote: Fri Aug 30, 2024 5:19 am i convert my first indicator treadingview to mlq4 power trend indicator

Code: Select all

// © Dreadblitz
//@version=4
//
study("BULL BEAR POWER TREND", shorttitle = "BBPT", overlay=false)
//
reg_trend_on = input(false, "Activate Reg Trend Line")
length       = input(defval=8, title="?? Length Reg Trend line=", minval=1)
//
BullTrend_hist = 0.0
BearTrend_hist = 0.0

BullTrend = (close - lowest(low, 50)) / atr(5)
BearTrend = (highest(high, 50) - close) / atr(5)
BearTrend2= -1*BearTrend

Trend = BullTrend - BearTrend

hline(0, title='Nivel 0', color=#000000, linestyle=hline.style_solid, linewidth=1)
niv_0=plot(0, title='Nivel 0"', color=#000000, linewidth=1, style=plot.style_line, transp=100)
hline(2, title='Nivel 2', color=#008000, linestyle=hline.style_solid, linewidth=1)
niv_2=plot(2, title='Nivel 2', color=#008000, linewidth=1, style=plot.style_line, transp=100)
hline(-2, title='Nivel -2', color=#FF0000, linestyle=hline.style_solid, linewidth=1)
niv_22=plot(-2, title='Nivel -2"', color=#FF0000, linewidth=1, style=plot.style_line, transp=100)

a=plot(BullTrend, title='Bull Trend"', color=#008000, linewidth=2, style=plot.style_line, transp=0)
b=plot(BearTrend2, title='Bear Trend"', color=#FF0000, linewidth=2, style=plot.style_line, transp=0)

fill(a,niv_2, color=#008000, transp=50)
fill(b,niv_22, color=#FF0000, transp=50)
fill(niv_22,niv_2, color=color.white, transp=60)

plot(reg_trend_on == false?Trend:na, title='Trend', color=#000000, linewidth=1, style=plot.style_line, transp=0)

if BullTrend < 2
    BullTrend_hist := BullTrend -2
plot(BullTrend_hist, title='Bull Trend Hist', color=#FF0000, linewidth=1, style=plot.style_columns, transp=0)

if BearTrend2 > -2
    BearTrend_hist := BearTrend2 +2
plot(BearTrend_hist, title='Bull Trend Hist', color=#008000, linewidth=1, style=plot.style_columns, transp=0)
//alexgrover-Regression Line Formula
x = bar_index
y = Trend
x_ = sma(x, length)
y_ = sma(y, length)
mx = stdev(x, length)
my = stdev(y, length)
c = correlation(x, y, length)
slope = c * (my / mx)
inter = y_ - slope * x_
reg_trend = x * slope + inter
//
plot(reg_trend_on == true?reg_trend:na, title='Trend', color=#000000, linewidth=1, style=plot.style_line, transp=0)
Thank you for the help. May I inquire what it signifies when simultaneously the bull is greater than 2 and the bear is less than -2, and how to trade under these conditions? Thank you.

Re: Trend Indicators for MT4

Posted: Fri Sep 20, 2024 6:17 pm
by thiru
kvak wrote: Tue Sep 03, 2024 8:17 pm Hello. Can you post what error is in comment?
moey_dw wrote: Tue Sep 03, 2024 8:35 pm Yes!! For sure thank you......
⛔ 2024.09.03 20:32:58.372 ! bbpt (fill + btn) EURUSD,M1: zero divide in '! bbpt (fill + btn).mq4' (170,60)
The zero divide error is fixed in this one. Can you try?
I tried myself on multiple pairs on 1 min charts.


Re: Trend Indicators for MT4

Posted: Thu Sep 26, 2024 11:22 am
by moey_dw
mrtools wrote: Tue Sep 03, 2024 9:21 am the problem has been all the time with the Atr causing a zero-divide error
kvak wrote: Tue Sep 03, 2024 8:17 pm Hello. Can you post what error is in comment?
thiru wrote: Fri Sep 20, 2024 6:17 pm The zero divide error is fixed in this one. Can you try?
GUYS ITS FIXED!!!!

Genius Thiru you have solved it man........ how you do that??? It works flawlessly on all timeframes now!!! Will you be able to share your fix privately with the boys mrtoolz and kvak so they can also see your solution please? Very good learning from your code

Re: Trend Indicators for MT4

Posted: Thu Sep 26, 2024 8:59 pm
by doolfrews
Pucmola wrote: Sun Sep 15, 2024 1:54 am The full version already has an owner, this basic - I can't publish it, sorry.
But, we are in the Trend thread, so I have approx. 30 minutes of time. I'll think of something for you. See you in half an hour...



edit:
set... it's just according to my preferences... everything can be set there according to your trading style
ENJOY
Dikes Pucmola! Toto je naozaj, ale ze skutocne naozaj pekna praca. Dakujem

Re: Trend Indicators for MT4

Posted: Mon Oct 14, 2024 1:17 am
by mrtools
moey_dw wrote: Thu Sep 26, 2024 11:22 am GUYS ITS FIXED!!!!

Genius Thiru you have solved it man........ how you do that??? It works flawlessly on all timeframes now!!! Will you be able to share your fix privately with the boys mrtoolz and kvak so they can also see your solution please? Very good learning from your code
Someone on another forum posted another fix, I changed it a bit was wondering if, when you get a chance you or really anyone can test this version, it's working for me, but need confirmation please. If good can develop it further maybe.