molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sun May 12, 2024 11:34 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: too many alerts for same signal
PostPosted: Wed Jul 04, 2012 9:52 pm 
Offline

Joined: Wed Jul 04, 2012 9:41 pm
Posts: 7
I am a newbie and have some questions:

1. I built a strategy (EA) to send me alerts when certain conditions are met. One of the conditions involves the bid price being above prior bar's high. It trggers fine and I get an e-mail but then it keeps triggering as the bid price fluctuates below/above prior bar's high. How can I set it to trigger the FIRST time the conditions are all met and then go quiet...i.e. no more alerts after the first? in the "BUY" block in the trading diagram, I set "Trade Management" = "Wait until an opposite trade is opened" think that this might work to avoid the proble above but no luck...Any ideas??

2. If I want to create a custom indicator that is the difference between the "main" and "signal" line of the stochastic oscillator indicator, is that possible? I don't have the custom indicator creation product yet and want to make sure that the above is possible.

Thanks very much!


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Fri Jul 06, 2012 9:40 am 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
1. I don't think "Wait until an opposite trade is opened" is what you want for this. Read the manual before you use it. Try using Completed Bars=True and Max Number of Positions=1 in your START icon.

2. Yes, this is possible in TIB. While I see why you say "gap," this is more commonly known as divergence. Gaps are generally discussed in terms of blank price data periods on a chart. You will import Custom indi just like in SB. Select Mode 0 and then reimport the same indi and select Mode 1 this time. Put a minus sign in between. Don't forget to use proper ()'s.

Note: It seems we can import ONE custom indi as many times as we like in one TIB block, but importing two different custom indi's into one TIB block throws an error.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Fri Jul 06, 2012 10:29 am 
Offline

Joined: Wed Jul 04, 2012 9:41 pm
Posts: 7
Thanks for the insight. Will take a look at your suggestions.


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Wed Jul 11, 2012 2:31 pm 
Offline

Joined: Wed Jul 04, 2012 9:41 pm
Posts: 7
Molanisfx -- is there a fix you are working on or would suggest to address this problem? I do not want to wait for the bar to complete before the alert triggers because that would render the strategy to be less effective.

Please advise.

Thanks.


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Wed Jul 11, 2012 5:37 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
If your conditions are like bid> high previous bar you will get an alert every time bid> high previous bar - so you will get many alerts. There is no way to tell the ea send me just one alert, the ea will send alerts every time the condition is true. One possible solution is to create a more complex condition. If you trade bars, you can try to define a cross, but you need to use bar info and not bid info. Post your strategy file .mol - we will take a look


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Wed Jul 11, 2012 6:50 pm 
Offline

Joined: Wed Jul 04, 2012 9:41 pm
Posts: 7
Molanisfx - here is the file...your help is appreciated!


Attachments:
PG_Strategy_open.mol [33.59 KiB]
Downloaded 456 times
Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Wed Jul 11, 2012 10:42 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
"Wait until an opposite trade is opened" is for trading, not for alerts so you cannot use it here
Most of your conditions do not use the current bar - you use the current bar to compare the bid with the previous high so this is the main condition that generates all those signals. There is no way to reduce the number of signals with that logic You can reduce them if you do not trade ticks, so you only look at the open.
Another way to send you signals is to have the ea trading in a demo account with the email mode on, so it will trade in demo, and you will get an email. Since you can control it to have one open position, you only get one email.
I see that there is room to improve the alert feature - maybe creating an alert icon would be the best thing to do for future releases.


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Thu Jul 12, 2012 7:58 am 
Offline

Joined: Wed Jul 04, 2012 9:41 pm
Posts: 7
Thanks. Good suggestions! Look forward to the alert feature enhancement you discussed!


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Wed Jul 25, 2012 8:36 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
I too could really use this feature. I'm creating a single filtering EA for 26 currency pairs. I usually hard code CalculateOpenPositions into each set of trading conditions, but if CalculateOpenPositions can't calculate the MaxNumberofPositions in Alert mode then I have to take the demo route as well.

Are there any supercoders here who know of a way to select (or count) the alert text that appears in the Experts tab of MT4? In other words, if I hard code text x into one alert, can I make a trading condition for another alert which says if (alert text x == true) {alert y}? If so, how would this be expressed in mql4?

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: too many alerts for same signal
PostPosted: Thu Jul 26, 2012 9:04 am 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
After sleeping on this, it came to me that I could hard code MolanisAlert into my BUY and SELL trading conditions--to make "alerting trade" entries limited by CalculateOpenPositions.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009