i am trying to find some descriptive statistics for financial instruments, and i don't know whether there could already exist some indicator that provided the information i have in mind or whether it would be possible to put some code together in ninjascript, spreadsheet or database analysis software or any other free software so that it would calculate the following.
for a financial instrument, let's say the fdax or the nk, i would like to know what is the biggest round trip price movement for each day. so, let's say the fdax is trading at 13,000 points at 900 cet, then by 1200 cet it has gone up to 13,300 and by 1500 cet it is back again at 13,000 and below, all in one same single day session. these are the kind of moves i am interested in measuring, where the price for some instrument goes up for a large number of ticks and then goes down again by that same number of ticks or greater inside one single session (it would be the same with large declines that are completely erased within the same session, i'm mostly interested in the absolute value of the moves).
the range (high minus low) of a day provides the greatest move inside one given session, but i'm only interested in the biggest move each day that was made and then completed reversed inside one single session.
maybe other members in this forum or the support staff for nt can think of any indicator or method to generate this information.
i have thought of the following method for the prices at close on 1 minute bars but it requires a lot of operations, there's no way i could code these instructions into ninjatrader but it would be fantastic if something like this could be done:
i would like to generate these daily statistics for a 10 - 15 year period on a number of instruments and what i think could work would be to take all the closing price data for 1 minute bars and then starting from the last minute of a particular day (let's say 17:00 et for nymex instruments), subtract the price for all earlier values that day (16:59 on the same day and back to 18:00 the previous day), then take the next to last period (16:59) and once again calculate its difference against all previous periods (16:58 to 18:00) and so on until the first two observations of the day (18:01 and 18:00).
once all these subtractions have been calculated for all the 1 minute intervals in a same day, i would just need all these values to be put together in one list and ranked in descending order from the biggest positive value to the most negative negative value and the smallest of these two extreme subtractions in absolute value would be the statistic i'm looking for: the biggest round trip move that particular day. these operations would then need to be repeated for every other day in the 10 year or so period we were analyzing.
this method i thought of deals with very basic operations and processes (subtractions, rankings, absolute values, minimums), so i don't think it would be too difficult for experienced, accomplished programmers to put it into code. i will also try to find other forums about programming and coding on the internet and see if i can get help with this. thanks.
Comment