|
|
|
|
|||||||
| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() |
| Bookmarks | |||||||
del.icio.us
|
StumbleUpon
|
Google
|
Digg
|
Facebook
|
Furl
|
Reddit
|
Netscape
|
|
|
LinkBack | Thread Tools | Display Modes | Language |
| The Following User Says Thank You to Blu-Ray For This Useful Post: | ||
J-S (03-26-2008) | ||
|
|||
|
Re: Trend Indicator for TS?
Blu Ray,
First, just a few comments. Believe me, I NEVER expected you or anyone else here to actually code anything for me! I just thought that someone might know of something in the universe of TS codes out there that might fit the description of what I'm looking for. I'm TRULY grateful! I wish you would have made that clear, though. The fact is, I've never (believe it or not) taken a screenshot of TS before. At first it wasn't uploading to this forum properly. Finally I tried saving the image as a jpeg instead of a bitmap file and now it seems to have worked. I just thought that a good description would be as good as an image, but I guess you feel otherwise. But again, had I known that you were actually going to attempt to code something, I would have acted differently. Also, I have no doubt that Thrunner's information is, yes, excellent, and it wasn't my intention to dismiss it. It's just that I try to trade (like, I would think, most serious traders) very rule-based, and this definition of a trend fits my rules. I'm not saying that others aren't valid -- they're just not mine. Please keep in mind that what I'm trying to do here, in labeling these trends, is to disqualify potential trades without having to take the time to actually "count" the trend -- obviously very hard to do in a fast-moving market. Anyway, the good news is that I found a perfect pic for you! As you'll see from my annotations on the actual chart, the upmove on the left does NOT constitute a trend according to my rules because the six-tick retracement prevents it from being one. The downmove on the right IS a trend, as there is no six-tick retracement. By the way, you'll notice that my bars are of a much shorter timeframe (well, volume level, actually) than the ones in your image. I suppose it doesn't really make a difference in the actual calculation, but it's certainly clearer visually when there are more bars involved. Maybe that's part of the confusion here. So, finally, here's the chart! Thanks again. |
|
||||
|
Re: Trend Indicator for TS?
Thanks for the chart J-S.
The reason I asked for a chart is, as we all know, you can look at a chart and say " it's in an uptrend", but putting that into coding language is not so straight forward. Let me explain using your chart. You could go for, for example, 3 higher highs.........so the code would be if H > H[1] and H > H[2] and H > H[3] then plot............ but using your chart it would stop where I've marked A. Alternatively you could use the code so if the high is higher or equal to previous bar, this would get you above A, but it would also signal an uptrend at B for example. You could then move on to higher highs and higher lows and this would again stop at A. You could then do as above so the high and low are greater or equals to the previous, but realise that could result in C. Another thing that you might ( edit: you will ) find is that where I've marked D. for example if that low was 1 tick above the previous low then your downtrend is invalidated ( via the code ) but you're still clearly in a downtrend. Basically what I'm trying to point out is that although visually we can spot a trend, but putting that into code needs criteria. Hope this helps Blu-Ray ![]()
__________________
Remember - Take the path of least resistance. |
|
||||
|
Re: Trend Indicator for TS?
J-S on your chart the downtrend is over almost as soon as it starts. You don't know it is a downtrend until it has moved 4 points right? A point later price retraces 6+ ticks so its finished.
There are much better ways of determining trend imho that you can see instantly just using price action. Is price making higher highs higher lows and higher closes? Is it leaving higher swing highs and swing lows? etc. Thats just my opinion each to there own of course ![]() You might want to check out Clyde Lee's website the swing machine he has a tradestation function called swingleeII (from memory) that is freely given and has many user inputs and options to determine swing points. It will plot a zigzag swing to swing I think too. Actually i believe most zigzag indicators will do what you require with little or no modification. Cheers. |
|
|||
|
Re: Trend Indicator for TS?
Okay, this is obviously more difficult than I thought. Or, maybe I should say, than I had hoped! I'm going to have to take some time to digest all of this after-hours. I'm kind of getting the feeling that what I want is not possible -- indefinable by code.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Heikin Ashi Trend Indicator | Soultrader | Trading Indicators | 25 | 02-21-2008 06:24 PM |
| Objective ways to define a trend day before the trend has run its course?? | Adamned | Technical Analysis | 7 | 01-29-2008 09:06 AM |
| REQ Help with Trend Indicator | jjthetrader | Coding Forum | 55 | 12-14-2007 05:33 PM |
| Trend lines on an indicator | zardoz | Technical Analysis | 1 | 05-16-2007 12:59 PM |
| Volume Gradient + Heikin Ashii Trend Indicator | GCB | Trading Indicators | 27 | 04-07-2007 08:29 AM |