[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Every Tick" versus End of Bar



PureBytes Links

Trading Reference Links

At 01:33 PM 12/17/97 -0800, info@xxxxxxxxxxxxx, AKA "Bill: wrote:
>.... So I programmed "If CheckAlert then Alert=true;". 
>My problem is when the conditions are met every tick on that bar
>triggers the alert. On a 10 min S&P chart it drives me dingy. Is there a
>way to program the alert to advise once when the condition is met and
>them remain silent until the next bar and start watching for the
>conditions again? 


Bill raises a good question here, and one that is not limited to
setting the Alert flag = true.  It gets into the question of running
an indicator on every tick or every bar.  If the latter, things are
pretty straightforward - the code just executes at the completion of
each bar.  BUT, if you check "Update every Tick" under the "Properties"
tab of the Format Indicator page, then it's a whole different
ballgame.

So, the question becomes - Is there a way to set a flag to true at
the end of each bar, but then set it to false the first tick that
triggers a condition, such as Bill's alert?  For example:

AlrtFlg = true {somehow, this only happens at the conclusion of 
                each bar - NOT every tick}

If Condition1 and AlrtFlg then begin {where condition1 sets the alert}
  If checkalert then Alert = true;
  AlrtFlg = false   {to ensure only one alert per bar}
End;

Jay Mackro