0

I am using 1 second delayed data on the eur/usd to try and get a working slow stochastic indicator. Nothing seems to work, I have tried implementing the formula: %K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100:

K1 = (high - low) /100 K = (close - low)/K1 and k = (close - low) / (high - low) * 100

using decimal numbers (as opposed to floats)in a python script and have used the STOCH function from TAlib but they both produce the same type of result; numbers for the K line (D line not yet implemented) that jump all over the place.

namor
  • 97
  • 1
  • 3
  • 11
  • Could you elaborate on 'jump all over the place'? 1 second bars on the EUR/USD do in fact 'jump all over the place. Also, have you cleaned the data? At the 1 second level you'll have bars without any trades in there – michael_j_ward Jun 06 '16 at 16:11
  • I filter out all of the trades that don't = 0 and are < 1. The K line numbers that I get will go 96, 44, 26, 88, 11 and the stochastic indicator from my broker is at 32 the entire time. – namor Jun 06 '16 at 16:27
  • 1
    I would do a few things. First write a few tests to make sure you've coded the calculation function correctly. Second, post the function with some example data with the *expected* output – michael_j_ward Jun 06 '16 at 16:35
  • ok, when I get a chance I will manually calculate the results and see if I can find the problem. – namor Jun 06 '16 at 16:43
  • Also, make sure you know exactly how your broker is calculating it. If it is staying steady like you say, then it probably is using intervals larger than 1 minute or some sort of smoothing / averaging. – michael_j_ward Jun 06 '16 at 16:44

0 Answers0