| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #9 | ||
![]() | thanks for asking. Since you are interested in a recent value of the "direction", you limit your computations to a recent number of price variations ("moves" from a gridline to another). The (k-1) would represent how many latest distinct price changes you are considering to assess the recent "direction". When you use equispaced gridlines (and do not use weighting), you can just simplify as follows (which is immediately intuitive to visualize): Code: Number of "UpMoves" - Number of "DownMoves"
sdx = -------------------------------------------------------------------- * 100
Number of all "Moves" [ The distance between gridlines depends on your "timeframe" (similar to when you measure time, you may be interested in microseconds variations, or you may just be intested in minutes, depending on what you are doing). (I often use a distance between gridlines equal to 0.1% of the price.) ] Let me know if something unclear here. Tom Quote:
Last edited by tommaso; 12-22-2011 at 04:02 AM. | ||
| |
|
| The Following User Says Thank You to tommaso For This Useful Post: | ||
Do Or Die (12-22-2011) | ||
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Slope of MACD Calculate Angle | v101 | Technical Analysis | 7 | 07-13-2010 04:33 AM |
| MA Slope | PeterBrazel | Coding Forum | 4 | 08-18-2009 12:05 AM |
| Tick Size Calculation | PeterBrazel | Coding Forum | 1 | 08-17-2009 08:55 PM |
| MA Slope | PeterBrazel | Coding Forum | 19 | 07-05-2009 11:27 PM |
| Determine Slope End or Start | januson | Technical Analysis | 11 | 11-20-2008 04:39 PM |