Thread: How to code?
View Single Post
  #1614 (permalink)  
Old 02-25-2009, 02:53 AM
Linuxser's Avatar
Linuxser Linuxser is offline
User Root
 
Join Date: May 2006
Location: Helliconia (Winter)
Posts: 4,410
Blog Entries: 56
Linuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond repute
Quote:
Originally Posted by undertitan View Post
I wrote an indicator, and have an alert option, and when the Alert() is turned off, it prints a Comment() in the experts log.

I only want to know if the condition exists(give an alert) on the actual Close of the bar, which would be Close[i+1] I thought...

However, when I run the indicator with the Alert() on, it gives me multiple alerts on the current bar while the condition is happening, and generates too many alerts.

My log file for only a couple of hours was over 35mb!

How do I fix this problem?

Please see the attached indicator, which identifies a trend continuation pattern. ( described on a trader's website: 9/30 Setup )

Thanks,

Dan
Try something like

int limit;
int counted_bars=IndicatorCounted();

if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;

for(int i=1; i<limit; i++)
Reply With Quote