quibowibbler
Newbie
- Messages
- 8
- Likes
- 0
Hi,
Im currently trying to convert some tradestation code that uses "upticks" and "downticks".
I've worked out that upticks and downticks represent the volume of buys and the volume of sells respectively.
Now I'm doing this for shares- I know this is a Forex forum but Im sure it is relevant here too, I just don't know what the equivalent words for some terms asre for the total volume of shares on the market.
My data only has the total traded volume for the day, which is obviously the sum of upticks and downticks. So:
Upticks+Dnticks = Voume ...(1)
Now I also know the price change in the day is equivalent to the ratio between upticks and downticks, so:
Upticks-Dnticks = dprice*Nshares ...(2)
where Nshares is the total number of shares on the market and dprice is the ratio of price move
dprice=(close(today)-close(yesterday))/close(yesterday)
Substituting (2) into (1) and rearranging gives:
Upticks=0.5*(dprice*Nshares+volume)
and
Dnticks=volume-upticks.
However, something is wrong as my downticks variable is often negative.
If anyone can spot what I've done wrong, please advise. It would be a massive help
Thank you
Im currently trying to convert some tradestation code that uses "upticks" and "downticks".
I've worked out that upticks and downticks represent the volume of buys and the volume of sells respectively.
Now I'm doing this for shares- I know this is a Forex forum but Im sure it is relevant here too, I just don't know what the equivalent words for some terms asre for the total volume of shares on the market.
My data only has the total traded volume for the day, which is obviously the sum of upticks and downticks. So:
Upticks+Dnticks = Voume ...(1)
Now I also know the price change in the day is equivalent to the ratio between upticks and downticks, so:
Upticks-Dnticks = dprice*Nshares ...(2)
where Nshares is the total number of shares on the market and dprice is the ratio of price move
dprice=(close(today)-close(yesterday))/close(yesterday)
Substituting (2) into (1) and rearranging gives:
Upticks=0.5*(dprice*Nshares+volume)
and
Dnticks=volume-upticks.
However, something is wrong as my downticks variable is often negative.
If anyone can spot what I've done wrong, please advise. It would be a massive help
Thank you