Calculating 15 minute high and low value for stock trading

hayerpa

New Member
Joined
Oct 24, 2019
Messages
1
Hello people,

i'm a newbie stock market trader and i trying my hand on algo trading for a while and i thought of doing all the calculation on my excel sheets. now i'm stuck with a problem for past few days and i'm not able to solve it, so i'm need of a help from fellow members of this forum to help me out.
ok so there is strategy called opening range breakout where one has to calculate the high and low of the stock for a determined time frame that can be 5 or 15 minute depending on the user, now my problem is that as i'm getting tick data from my vendor and i like to save the high price and low price of particular stock on that time frame for strategy to work, but i'm not able to do so.

below is the excel sheet data what i'm talking about now the formula i used in cells are as follow:
i'm able to get the high low value of the stock when the time starts but the value keeps changing even when the end time has passed.
also i like to know as you can see the column "B" is where a tick by tick data every second arrives so i need to use conditional format in it whenever it changes, or you can it changes color whenever there is change in data, so how to do that.

start time = when high and low value should to track to start
end time = when the track ends
5_min_high = high value formed between time start time and end time =IF(AND(V2="Yes",W2="Yes"),H2,H2) {formula used}
5_min_low = low value formed between time start time and end time = =IF(AND(V2="Yes",W2="Yes"),I2,I2) {formula used}
high start = IF(S3>=T3,"Yes","No")
High low = =IF(S3<=U3,"Yes","No")

i hope anyone who is reading this understands what i'm asking :) please let me know the solution as i'm banging my head over this issue since couple of days.


ABGHIJSTUVWAAAB
Trading stockslast_priceopenhighlowcloseTimestart timeEnd timeHigh startHigh low5_min_ High5_min_Low
WIPRO250.6253.9254.2249.25254.351:10:55 PM12:25:00 PM12:30:00 PMYesNo254.2249.25
MFSL420.7424.65424.8420.4423.61:10:54 PM12:25:00 PM12:30:00 PMYesNo424.8420.4
RELIANCE1407.514011410.11386.551392.41:10:56 PM12:25:00 PM12:30:00 PMYesNo1410.11386.55
PCJEWELLER34.635.535.833.835.951:10:54 PM12:25:00 PM12:30:00 PMYesNo35.833.8
BHEL51.7553.854.351.553.851:10:56 PM12:25:00 PM12:30:00 PMYesNo54.351.5
ALBK2626.1526.4525.826.051:10:37 PM12:25:00 PM12:30:00 PMYesNo26.4525.8
TATACOMM349.15361361.8348.05359.251:10:46 PM12:25:00 PM12:30:00 PMYesNo361.8348.05
IOC142.3144.65144.95141.4144.51:10:56 PM12:25:00 PM12:30:00 PMYesNo144.95141.4
RPOWER3.63.63.63.63.31:10:51 PM12:25:00 PM12:30:00 PMYesNo3.63.6
AJANTPHARM1007.051009.91014100310061:10:02 PM12:25:00 PM12:30:00 PMYesNo10141003

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Swayzy

Board Regular
Joined
Mar 30, 2018
Messages
78
With some simple vba you can all the up and down ticks you want in separate sheets.

I cant see you solving this without some saving of data since I assume that your problem is that your vendors data keeps changing (updating). For this VBA is THE king, you can save the current tick and for example check wether it is higer or lower than before and thua check vs your current periods lowest low etc...
 

Watch MrExcel Video

Forum statistics

Threads
1,127,167
Messages
5,623,130
Members
415,956
Latest member
Footballtend

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
Top