by cjones198 » Sun Sep 27, 2020 8:09 pm
Hi all
I was just wondering if anybody had a good formula for allowing you to only log a price when it moves x number of ticks?
For example
I want only to log a price if it moves 2 ticks.
Let's say I open a market and start recording at a price of 2.80. When the price hits either 2.76 or 2.84 it logs the price and copies it to another cell on another sheet. The copying and paste and making sure the cell offsets i can do. I even came up with a formula to log price changes but wasnt precise enough, the problem occurs because of crossovers.
How I'm doing it now. I have a variable called Price which is the current price of the horse.
So it goes like if Price <> sheets("Market").cells(5,15).Value and Price <= sheets("Market").cells(5,15)- (2 * tick increments) then
Blah blah blah plot
So I am asking excel in this example price is 2.80 , cell 5,15 is 2.84, 2 * tick increments (0.02) so 2.84 - 0.04 = 2.80, so Price is less than or equal to 2.80.
But..... I want it precise so it logs only 2 tick increments so no <= only a = used.
The problem occurs at a crossover using this formula, say I open a recording at 2.98, 2 ti is from this is of course 3.05, so using my calculation but only using a = and not <= we have Price =2.98 cell(5,15) = 3.05, 2 * 0.05 = 0.1
So 3.05 - 0.1 = 2.95 so it needs to = 2.98, how I got over this to use <= I set tick increments to variable Price and not cell (5,15)