Hi....I've been playing around with a dashboard and can't get the alerts to fire while it's running.
The alert should happen when D1 HA, W1 HA and RSI 20 is all red or all green. It is also supposed to alert should any of the all green or all red states change.
Can someone help me to figure out why this is not working? Thanks.
Issue with Dashboard alerts
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
You do not have the required permissions to view the files attached to this post.
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
Issue with Dashboard alerts
Initially when you load the indicator you get hammered with Alerts. Have a look at the dashboard:
You see that except for AUDCAD and GBPNZD, all symbols have the same color 'dots'. So, you get an BUY or SELL alert for all symbols, except for AUDCAD and GBPNZD, for which you get a 'SYSTEM EXIT' alert. Now look at the code:
When an Alert() is sent for a particular symbol indexed 'y', it sets the m-flag for that symbol to 1. This is presumably, so that you won't get ear-damage from all the alerts being sent every tick. The idea is that once an alert has been sent for a given symbol, it won't send it again. However, the m-flag is never reset back to 0. So the condition " if (m[y] == 0 && Alerts) " will always be false, irrespective of any of the dots changing color. I have changed the code a little bit such that each symbol can have three different 'states': GREEN, RED and MIXED. Each time the state of a symbol changes, you will get an Alert. Code is attached.
Code: Select all
if( m[y] == 0 && Alerts) {
Alert(Symbols[y]+", HA SYSTEM SELL SETUP, @ "+iClose(Symbols[y], 1440,0));
if (Notify) SendNotification (Symbols[y]+", HA SYSTEM SELL SETUP");
SendMail(Symbols[y] + " ,HA SYSTEM SELL SETUP!!!",Symbols[y] + " HA SYSTEMSELL SETUP @ "+iClose(Symbols[y], 1440,0));
PlaySound("Alert.wav");
m[y] = 1;
}You do not have the required permissions to view the files attached to this post.
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
Thank you renexxxx for the help....I certainly have more to learning about coding .mq4.
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
BTW, I finding this strategy profitable over the last two weeks....I've also modified for H4. I've also changed the trend column using ADX 14 numbers instead of the Trend text. Tnx agn.
You do not have the required permissions to view the files attached to this post.
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
I was thinking that having a count of consecutive HA bars might be beneficial to determining if the signal is recent or something in the past. I had trouble finding code that displays consecutive HA bars. Would someone have something like this in their library? Thanks.
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
I found the code for counting the bars, so I'm trying to figure out how to convert a histogram to a digital indicator
You do not have the required permissions to view the files attached to this post.
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
I managed to get this display working for one indicator but I'm not sure how to incorporate into dashboard...
You do not have the required permissions to view the files attached to this post.
-
rangerlp
- Trader
- Posts: 38
- Joined: Tue Dec 10, 2013 3:28 am
Issue with Dashboard alerts
So here's the dashboard with the HA count and it seems to be working fine. Make sure that you have CCC installed and compiled as the dash makes a call to it....
You do not have the required permissions to view the files attached to this post.