stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Issue with Dashboard alerts
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4395
Page 1 of 1
Author:  rangerlp [ Fri Aug 21, 2015 6:37 pm ]
Post subject:  Issue with Dashboard alerts

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.
Author:  renexxxx [ Sat Aug 22, 2015 4:40 am ]
Post subject:  Issue with Dashboard alerts

Initially when you load the indicator you get hammered with Alerts. Have a look at the dashboard:
Selection_103.jpg
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:

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;
         }
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.
Author:  rangerlp [ Sat Aug 22, 2015 2:23 pm ]
Post subject:  Issue with Dashboard alerts

Thank you renexxxx for the help....I certainly have more to learning about coding .mq4.
Author:  rangerlp [ Wed Aug 26, 2015 5:27 pm ]
Post subject:  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.
Author:  rangerlp [ Fri Aug 28, 2015 12:02 pm ]
Post subject:  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.
Author:  rangerlp [ Sat Aug 29, 2015 11:49 am ]
Post subject:  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
Author:  rangerlp [ Sun Aug 30, 2015 12:28 pm ]
Post subject:  Issue with Dashboard alerts

I managed to get this display working for one indicator but I'm not sure how to incorporate into dashboard...
Author:  rangerlp [ Tue Sep 08, 2015 12:17 pm ]
Post subject:  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....
All times are UTC Page 1 of 1