Making an alert occur only once per bar

 
How would I make an alert only occur once per current bar and reset for the next bar? ty
 
if (condition){
   static datetime Time0;
   if (Time0 != Time[0]){ Time0 = Time[0]; Alert(...); }
}
Next time use this
 
The last part was unnecessary but thanks just the same. and yes I did search for it but didn't see a solution. I'm also new to programming so it may be easy for you to spot immediately what your looking for since you already know but not for everyone who doesn't. Anyway I'll look into this.. Anyone got any other solutions don't hesitate to reply... This is for discussing programming is it not...
 
ok well that didn't seem to work... i must have did something wrong.. anyone else? I guess I need to read to book again :((( oh well fuck it.
 
have u tried to search "alert per bar"
 
x11115:
I guess I need to read to book again :((( oh well fuck it.
Great attitude . . that will get you lots of help . . . well done.
 

Well it is pretty frusterating and the little cartoon thingy isn't something you want to see when you have to find a solution to something - forgive me for having emotions and not licking but. I suppose you dont' have anything better to do? I've helped lots of people in my time. Hey if you don't want to help me I don't really want your help go somewhere else to talk about programming besides me :). I have alot to contribute about trading and have made a few indicators. If I need help on something I will ask - it shouldn't be that big of a f'ing issue. Just because I get stuck on something doesn't mean I can't contribute too. So there I'll remember you said that RaptorUK - respect is a 2 way street. And honestly I don't really "need" anyone's help but it is nice to get help. Makes it a little more productive eh. Notice I did start with a good attitude and even said ty after my 1st post so shove it snob.

"well done"

thank you I found a solution to my problem - arms in the air - VICTORY!!!! I don't need to suck up to you. ha ha shove off!!!! you are not needed - comprehend?


oh and saying f' it for being frustrated is not directed at anyone. You really took that as I was saying to f off to someone you must not comprehend English. But you are from the UK? oh what a laugh you are. That is basically like saying you are frustrated and give up. If you are an adult you should understand that. I wouldn't ever tell WHRoeder to f' off for trying to help me even if I disagreed with him. I guess you people in the UK are more like clones and dont' have emotions but here in the US we are allowed to express ourselves. I didn't find WHRoeder to be offense but your comment is - I was just frustrated I couldn't make my program work. Anyway you are not worth the time and a bit of a troublemaker by insinuating I was telling him to f off I was saying f it I give up. I gave up for awhiile because I was frustrated but with persistance I got what I wanted. So yes well done!!!! And what a burn on you to think I would fail just for saying fuck it.

I hope you get a flat tire or something! Don't forget how Karma works!!! You jinx someone you get paid back x10!!

 
qjol:

have u tried to search "alert per bar"

I found a solution. It was in another indicator. Thanks.

I'll search for that though for the learning experience.

 
x11115:


I hope you get a flat tire or something! Don't forget how Karma works!!! You jinx someone you get paid back x10!!

You came back to this thread after a month to post this ?

Is it too much to ask for you to be civil ? I guess it is . . .

 

You really have a big ego to think my life revolves around you. I am civil I just got agitated because my code didn't work - as I've stated quite plainly but you can't seem to get it through your head. Saying I give up is not being uncivil? "ah fuck it!!!" is uncivil to you? Oh brother! What a baby. It's called being frusterated. You really have no concept of English if you think that is uncivil - it is not - it's called being human. If it was directed at anyone it would be different and I would appologize but it wasn't. You apperently must live in a police state or something. Quite trying to make trouble out of nothing. Do you have some kind of problem?

Anyway you could of helped me and you didn't because I got frusterated. You are quite a childish man.


Hey don't worry about it - what goes around comes around good ol' chap.
 
x11115:

It's called being frusterated. You really have no concept of English if you think that is uncivil - it is not - it's called being human.

I think you are the one in need of help with your English . . . I think you mean "frustrated". :-)

We all get frustrated, but not all of us choose to show it by swearing on an open Forum. Nor do most come back to this Forum a month later just to wish harm on another member . . . letting your emotions get the better of you will not help your coding, to code you need to be logical not emotional.

I'd wish you the best of luck . . . but I don't accept the concept of luck, nor Karma, Ghosts, Santa Claus, The Easter Bunny, etc, etc