Counting # of times a stock reaches a certain price in a session/Probabilities

nickee

New Member
Joined
May 23, 2019
Messages
5
How can I record # of times a stock reaches a certain number throughout the day? Currently I only have a function for when it is at that number it returns 1 and if not a 0. i need a running count.

Basically I am looking to record the success of a tick fade play.

When the $TICK reaches +1000 I want to short the /YM with a 20 point target and 30 point stop.

Can someone steer me in the right direction please?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If you put this code in the worksheet change event it will do it for you.
I have assumed the price is in A2, the target in B2 and the count in C2.

Code:
Dim Above As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Intersect(Target, Range("a2:a2")) Is Nothing) Then
 If Target.Value > Range("b2").Value And Not (Above) Then
   Application.EnableEvents = False
   Range("c2") = Range("c2") + 1
   Application.EnableEvents = True
   Above = True
  End If
 If Target.Value < Range("b2").Value Then
   Above = False
 End If
End If
 
End Sub
 
Last edited:
Upvote 0
Nickee - how are you capturing the ticker and where are you storing it?
It sounds like you are working with a live feed and day trading.
I am sure you would find a brokerage sofwtare would have all of the logic you are looking for and more.
 
Upvote 0
Thank you for your message. I am still having a bit of trouble with it. Do you trade regularly? i'd love to share some of my notes and gain some more insight if you're up for it. I appreciate anything you can offer.
 
Upvote 0
Thank you for your message. I am still having a bit of trouble with it. Do you trade regularly? i'd love to share some of my notes and gain some more insight if you're up for it. I appreciate anything you can offer.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top