• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 9:33pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 9:33pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Please code round number alert indicator (indi Request) 4 replies

4H Stochs Email Alert Code Help Please 19 replies

Please add email alert to this price alert indicator 0 replies

Please add alert to Parabolic Sar 2TF - Please Help! 0 replies

Please help add email alert to code 1 reply

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 21
Attachments: Help Please with Indicator Alert Code
Exit Attachments

Help Please with Indicator Alert Code

  • Last Post
  •  
  • 1 Page 2
  • 1 Page 2
  •  
  • Post #21
  • Quote
  • Dec 29, 2019 7:13pm Dec 29, 2019 7:13pm
  •  Burton
  • | Joined Jan 2008 | Status: Member | 215 Posts
Hi BlueRain, ok I will test/try and will let you know later

Quoting BlueRain
Disliked
{quote} Can you try this one and let me know? I have moved arrow handling block to its own block. It seems to be working but if you find any issue, please let me know. {file}
Ignored
  • Post #22
  • Quote
  • Dec 31, 2019 5:12pm Dec 31, 2019 5:12pm
  •  Burton
  • | Joined Jan 2008 | Status: Member | 215 Posts
Hello BlueRain

I have attached a pic to show you what is happening,

The arrow alignment is not correct from the HP_Arrows to the HP_Diff indicator

The Green up arrow is on the last bar of the Red line, and the Red down arrow is on the last bar of the Green Line,

Otherwise indicator working perfectly
Attached Image (click to enlarge)
Click to Enlarge

Name: HP_pic.jpg
Size: 98 KB
  • Post #23
  • Quote
  • Dec 31, 2019 11:34pm Dec 31, 2019 11:34pm
  •  BlueRain
  • Joined Sep 2019 | Status: Member | 828 Posts
To match with HP, I have fixed HP_Diff_Alerts indicator by shifting 1 bar to left

//uptrend
UpTrend[x+1] = 1;
DownTrend[x+1] = -1;


UpTrend[x+1] = -1;
DownTrend[x+1] = 1;
Attached Image
Attached File
File Type: mq4 HP_DIFF_Alerts.mq4   6 KB | 166 downloads
I still don't know where is the Holy Grail
  • Post #24
  • Quote
  • Jan 1, 2020 12:36am Jan 1, 2020 12:36am
  •  Burton
  • | Joined Jan 2008 | Status: Member | 215 Posts
Hi Blue Rain, Thank you for that adjustment
  • Post #25
  • Quote
  • Jan 1, 2020 1:52am Jan 1, 2020 1:52am
  •  BlueRain
  • Joined Sep 2019 | Status: Member | 828 Posts
This is Utility Indicator with Perf % for each and whole position to show up on chart window.
Attached File
File Type: mq4 NB i-Breakeven.mq4   13 KB | 86 downloads
I still don't know where is the Holy Grail
1
  • Post #26
  • Quote
  • Edited at 3:36am Jan 1, 2020 3:17am | Edited at 3:36am
  •  penuelophir
  • | Joined Aug 2014 | Status: Member | 65 Posts
I am looking at the HP DIFF Alert indicator and I am thinking Does it repaint?
  • Post #27
  • Quote
  • Jan 1, 2020 4:39am Jan 1, 2020 4:39am
  •  BlueRain
  • Joined Sep 2019 | Status: Member | 828 Posts
[quote=penuelophir;12683035]I am looking at the HP DIFF Alert indicator and I am thinking Does it repaint?[/qu

Any indicator that checks "current bar" will repaint as current bar might change its value at any time and bar is not closed.

HP is kind of Moving Average indicator - so if you set it to check current bar, it will repaint.
You should check it as 1 ( which is previous bar ) if you don't want repaint.

There is option that you can change in HP indicator.

HP_Diff_Alert is just reading HP Indicator's value and displaying as Up or Down.
So, if you don't want to repaint, you might have to change which bar to be checked.
I still don't know where is the Holy Grail
2
  • Post #28
  • Quote
  • Jan 1, 2020 4:53am Jan 1, 2020 4:53am
  •  penuelophir
  • | Joined Aug 2014 | Status: Member | 65 Posts
Hello Bluerain, Thanks for your prompt responds and I very much appreciate it. So if you wait for the bar to close then it would not repaint on the closed bar? Also what is the indicator on the main chart? Thanks once again!!!
  • Post #29
  • Quote
  • Jan 1, 2020 5:11am Jan 1, 2020 5:11am
  •  BlueRain
  • Joined Sep 2019 | Status: Member | 828 Posts
Regarding HP indicator, You can open source code and you will find HP indicator is based on
Hodrick-Prescott Filter - this is explained in this link to https://en.wikipedia.org/wiki/Hodrick–Prescott_filter

it is very complex mathematical calculation that says
"It is used to obtain a smoothed-curve representation of a time series, one that is more sensitive to long-term than to short-term fluctuations."

Basically, you should use this HP for "Longer term" trend, not just last bar signal change.
Ideally, you should follow its trend - means you are better off wait few bars closed before it forms clear trend.

If you wait until current bar is closed, it shouldn't repaint for sure.
I still don't know where is the Holy Grail
2
  • Post #30
  • Quote
  • Jan 1, 2020 5:16am Jan 1, 2020 5:16am
  •  penuelophir
  • | Joined Aug 2014 | Status: Member | 65 Posts
Quoting BlueRain
Disliked
Regarding HP indicator, You can open source code and you will find HP indicator is based on Hodrick-Prescott Filter - this is explained in this link to https://en.wikipedia.org/wiki/Hodrick–Prescott_filter it is very complex mathematical calculation that says "It is used to obtain a smoothed-curve representation of a time series, one that is more sensitive to long-term than to short-term fluctuations." Basically, you should use this HP for "Longer term" trend, not just last bar signal...
Ignored
BlueRain You are the man and thanks for your time and I very much appreciate it,
  • Post #31
  • Quote
  • Last Post: Sep 30, 2020 2:16am Sep 30, 2020 2:16am
  •  tbakir
  • | Joined Aug 2019 | Status: Junior Member | 5 Posts
Quoting BlueRain
Disliked
I had some free time this morning to fix your code as I won't do any more trading until new year. It now checks if trend is changed ( basically compare two buffer value of previous two bars ) and alerts. Plus, I have renamed few variable for easier reading. I am sure you can figure it out. Please test out {file}
Ignored
How to create an alarm every 5 minutes

double uzun = iClose(_Symbol, PERIOD_M1, 100);
double kisa = iClose(_Symbol, PERIOD_M1, 10);
double canli = iClose(_Symbol, PERIOD_M1, 0);
double uzun_yuzde = ((canli-uzun)/uzun)*100;
double kisa_yuzde = ((canli-kisa)/kisa)*100;
double uzun_kosul_yuzde = 0.10;
double kisa_kosul_yuzde = 0.01;
if((uzun_yuzde>uzun_kosul_yuzde)&&(kisa_yuzde>kisa_kosul_yuzde))Alert(_Symbol," BUY ",uzun_yuzde," ",kisa_yuzde);
if((uzun_yuzde<-uzun_kosul_yuzde)&&(kisa_yuzde<-kisa_kosul_yuzde))Alert(_Symbol," SELL ",uzun_yuzde," ",kisa_yuzde);
Attached File
File Type: mq4 yeni.mq4   2 KB | 33 downloads
  • Platform Tech
  • /
  • Help Please with Indicator Alert Code
  • Reply to Thread
    • 1 Page 2
    • 1 Page 2
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021