Private upperThresholds As New List(Of Double) From You might also consider not hard-coding those values so that they can be changed easily without recompiling, e.g. I've used type Double there because you did in your code but those values really ought to be type Decimal. If (price > 0.05060 AndAlso previousPrice 0.05080 AndAlso previousPrice = 0.04960) Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick But how can I manage this? I'm quite stuck on it. Obviously, It's important not to stop timer1, but instead timer2. Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick The closest idea I got is : Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick How can I let the timer1 check if the price is above the values and if yes tick just one? Obviously timer 1 is ticking every 5 seconds to check if the price is above the value I chosen, but then if the price rises above that chosen value then it's sending the alert through PushBullet every time it ticks. Everything works perfectly, but the timer2. I'm parsing the "price" through an online API by timer1 in real-time. I'm sending the alerts through Pushbullet API to my phone and I don't want to flood it. I'm struggling when comes to send the alert to my phone because I want the timer to fire just once for every value I choose. Since there aren't really good apps for instant crypt price alerts, I'm doing it by myself.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |