No one knows how to accomplish this? or is it so simple that I'm just missing it?
static datetime alert_bar_time=0; // // if(i==0 && Condition && alert_bar_time!=Time[0]) { alert_bar_time=Time[0]; Alert("..."); }
Use variable names that describe what they are.
Calling your buffer "CrossUp" makes no sense when you are checking for an inside bar
for (counter=i ;counter<=i+9;counter++) { AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]); } Range=AvgRange/10;
Here you call the sum of the range "AvgRange" and call the average "Range".
It may not matter for simple code, but can be confusing when it gets more complicated.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have the following indicator code. It shows an arrow on the screen when a certain condition exists.
I want to have it send an email when the condition exists AFTER I attach it to the chart. The problem is that it currently tries to send emails for each occurrence when I attach it.
Can anyone help please ?