Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.
Welcome, JohnPS!
I'm going to have to study that when I have a little more time to focus. I think there's an infonugget in there that I have yet to discover first hand.
Tony, have you seen what John's describing? Kinda makes sense to me at first blush.
...infonugget... I think I just made up a word.
Check out our stats....
http://investorshub.advfn.com/boards/most_read.aspx
2099 reads TODAY. The people that can post will, the people that can't post will benefit... and that's OK.
So Q, if you'd like to throw out some of your selection strategies, I'll try to get you started with the coding...
I'm slightly jaded and skeptical... but I don't want to ruin your fun... LOL.
I'm open to options. And I've been thinking about it already. I don't like the threading here either. But the major thing I've been concerned about is that we're missing the ability to send files. We're going to need that eventually. I think Windows Messenger would be a good alternative for live messaging and file sharing... since peeps have to have Windows to run SD and it's native to the product. But I'm also concerned about too much talk and not enough trading, so we'd have to have some limits on online availability. If you see something better, let me know, and I'll keep thinking about it.
Anybody else have thoughts on any of that?
Hmmmm..... I'll give that a look and do some testing on it. Thanks!
It's because I didn't understand what I was doing. I know how to make it work now and I've executed a 100% test since then.
Live strategies just aren't that important to me... I'd rather look at charts and data. My personal preference is to set alerts based on my own chart annotations.... support, resistance, patterns and trendlines. That's enough automation for me.
I'm satisfied with StrategyDesk... I can make it do just about everything I want it to.
Plus I'm just not that sold on automated trading in general, so seeking another platform just because I don't like the way the live strategy engine works is not worth it.
I think I'm following what you're trying to do, but let me make sure.... you want the live strategy to test the current day bar every 5 minutes vs. tick by tick.... right?
First, I'm not sure how much different that would be than tick-by-tick... like is it a material enough difference to be worth the effort?
My second thought is to just put some time parameters in your code... like have the code execute only every 5 minutes. There are 390 minutes in the trading day, that would 390 / 5 = 78 conditions.
LOL... you sure about that?
Oh gotcha... I don't do thinly traded stocks. I run a "bare minimum" screener on the entire market every weekend... for things like average volume and atr-to-price... and then I use that list during the week to find my picks.
I was completely bummed when I discovered that as well and had given up on it until I saw that someone had actually made it work.
http://investorshub.advfn.com/boards/read_msg.aspx?message_id=37424061
Many times it's more about understanding how it works than it is finding something that's perfect.
I hear that Fidelity has a good backtesting/strategy engine, but it may be weaker than SD's. Good luck in your search!
Here's my more specific question on moving averages.
If I recall correctly, Shannon advocates that the trend being played into (in my prior example, the week) would have a complete "fan" formation... being defined as 10MA greater than 20MA and 20MA greater than 30MA... and all 3 going up. The MAs could vary, but they are all short term-ish. But to me, and others I've discussed this with, by the time the fan is in place, the trend is stale. I've been playing with some code to test this theory, but I've not had any luck. Wanted to know if you had had any experience with it.
Here's the code for the MA FAN SCORE. You might not be interested in it per se, but I wanted to show you the method I used... it's a neat coding trick for scoring conditions that can be defined progressively or incrementally. That probably makes no sense, but maybe it will when you read the code.
{SHORT-TERM (10,20,30) MA FAN….. 1=in position, 2 =all three in position and going up, 3=all three in position, going up, diverging, strengthening. Negative values are bearish, positive scores are bullish. Shannon advocates a buy on a score of 2 and a sell on a score of -2}
{BULL FAN -}
1 * (MovingAverage[MA,Close,10,0,W] > MovingAverage[MA,Close,20,0,W] AND MovingAverage[MA,Close,20,0,W] > MovingAverage[MA,Close,30,0,W]) +
{BULL FAN}
1 * (MovingAverage[MA,Close,10,0,W] > MovingAverage[MA,Close,20,0,W] AND MovingAverage[MA,Close,20,0,W] > MovingAverage[MA,Close,30,0,W] AND MovingAverage[MA,Close,10,0,W] > MovingAverage[MA,Close,10,0,W,01] AND MovingAverage[MA,Close,20,0,W] > MovingAverage[MA,Close,20,0,W,01] AND MovingAverage[MA,Close,30,0,W] > MovingAverage[MA,Close,30,0,W,01]) +
{BULL FAN +}
1 * (MovingAverage[MA,Close,10,0,W] > MovingAverage[MA,Close,20,0,W] AND MovingAverage[MA,Close,20,0,W] > MovingAverage[MA,Close,30,0,W] AND MovingAverage[MA,Close,10,0,W] > MovingAverage[MA,Close,10,0,W,01] AND MovingAverage[MA,Close,20,0,W] > MovingAverage[MA,Close,20,0,W,01] AND MovingAverage[MA,Close,30,0,W] > MovingAverage[MA,Close,30,0,W,01] AND (MovingAverage[MA,Close,10,0,W] - MovingAverage[MA,Close,20,0,W]) > (MovingAverage[MA,Close,10,0,W,1] - MovingAverage[MA,Close,20,0,W,1]) AND (MovingAverage[MA,Close,20,0,W] - MovingAverage[MA,Close,30,0,W]) > (MovingAverage[MA,Close,20,0,W,1] - MovingAverage[MA,Close,30,0,W,1])) +
{BEAR FAN -}
-1 * (MovingAverage[MA,Close,10,0,W] < MovingAverage[MA,Close,20,0,W] AND MovingAverage[MA,Close,20,0,W] < MovingAverage[MA,Close,30,0,W]) +
{BEAR FAN}
-1 * (MovingAverage[MA,Close,10,0,W] < MovingAverage[MA,Close,20,0,W] AND MovingAverage[MA,Close,20,0,W] < MovingAverage[MA,Close,30,0,W] AND MovingAverage[MA,Close,10,0,W] < MovingAverage[MA,Close,10,0,W,01] AND MovingAverage[MA,Close,20,0,W] < MovingAverage[MA,Close,20,0,W,01] AND MovingAverage[MA,Close,30,0,W] < MovingAverage[MA,Close,30,0,W,01]) +
{BEAR FAN +}
-1 * (MovingAverage[MA,Close,10,0,W] < MovingAverage[MA,Close,20,0,W] AND MovingAverage[MA,Close,20,0,W] < MovingAverage[MA,Close,30,0,W] AND MovingAverage[MA,Close,10,0,W] < MovingAverage[MA,Close,10,0,W,01] AND MovingAverage[MA,Close,20,0,W] < MovingAverage[MA,Close,20,0,W,01] AND MovingAverage[MA,Close,30,0,W] < MovingAverage[MA,Close,30,0,W,01] AND (MovingAverage[MA,Close,10,0,W] - MovingAverage[MA,Close,20,0,W]) < (MovingAverage[MA,Close,10,0,W,1] - MovingAverage[MA,Close,20,0,W,1]) AND (MovingAverage[MA,Close,20,0,W] - MovingAverage[MA,Close,30,0,W]) < (MovingAverage[MA,Close,20,0,W,1] - MovingAverage[MA,Close,30,0,W,1]))
<<if you enter market orders, you really need to see the level II to see how many offers are out there>>
LOL... what a nice problem to have. I ain't quite there yet. Gimme a few months. I have the capital, but not the skill, sorry to say.
If I'm understanding your question correctly, the answer is... you can't. I had several 100% accurate backtests using various intervals (without the detect intrabar = 1 min option selected). And the strategies were built based on what I could see on the chart. Like when I look at a day chart, I can visually tell when the sto is in the right position for the day and the MACDh has crossed 0 that day, etc.... but in real life, tick by tick, those things don't all happen at the same time, so they are never triggered as your eye sees them. Does that answer your question/make sense?
No, I have never achieved full automation. I spent a lot of time doing backtests many months ago, but was never able to take the strategies live, so I shelved it and have just now started to tinker with it again after Tony's inspiration. As far as participants on this board, Tony is the most experienced in this arena.
You can always implement live strategies that trigger alerts vs. trades. That way you always have to take action on your own before trades are executed. Relinquishing complete control to the computer is a big step, imo. I'm not sure I'll ever take that step.
I can tell you that your best analysis will be achieved by watching the same set of code in various ways... as a chart study, as a L1 column, as a backtest, in a screener, and as a live strategy. These methods together will give you a real understanding of your logic and its results. I'll also say that if your plan is to implement your backtesting strategies as live strategies, that you MUST test with "detect intrabar" set to 1 minute, else you're completely wasting your time.
I do use a TON of formulas... mostly in screeners, L1s, and chart studies... for the moment.
Hope that helps light the path a bit....
FB, you might benefit from reading the Formula & Syntax Guide....
http://www.tdameritrade.com/StrategyDesk/help.html?p=fbw
Honestly, there aren't too many real "take aways" in that doc for me... as in code that can be used out of the box... but it will give you a good idea of what SD is capable of and how to code the formulas. It takes a while to learn, but once you get your first few coded, it becomes really easy from there.
You can also use the Formula Builder (same link) to get an idea of how to generate code, but the components that are available there are extremely limited vs. what you have access to in the "Create your own formula" dialogue box within SD.
Happy trades to you!
Welcome freshlyblended! You might find your answer in tony's follow-on message... http://investorshub.advfn.com/boards/replies.aspx?msg=37494174
Bottom line on this whole subject for me is, if you can't predict the impact of the tick on the indicator, you can't use it real time... like I can't predict what tick data will do to the Sto, for example. Hope that makes sense.
Then I'd say the formula isn't valid. Have you used it before? What is the logic behind it?
Ha... I knew somebody would know more than me. Bright bunch here. Thanks hardtowin!
Hey, if your habit works, keep it up... but SD is an ~incredible~ tool.
I'll be gone a large chunk of Monday, but I'll check into it as soon as I can and let you know what I find out. Someone here probably already knows the answer...
I think so, but I don't trade pinks so I never really considered it. If you want to ping me during market hours with a symbol, I'll check on it for you.
And yes, shame on you! You don't know what you are missing!!!!
For the moment, floridagrl... whassup?
Instead of backtesting it, you might consider putting the code in a level 1 window to see what values you are getting. When I can't tell why the backtests aren't working, I use that approach so that I can see exactly what the data is doing.
I haven't seen that in SD. The only linear regression calc that I know of is the Time Series Forecast. What am I missing?
Those are some pretty consistent results... you may be onto something. I'll play around with this some this weekend... time and energy and braincells permitting!
What's lnr?
I'm assuming you're looking for a fresh cross, not just that it has crossed??? If so, try this...
((ExpMovingAverage[EMA,Close,3,0,D,1] / ExpMovingAverage[EMA,Close,8,0,D,1]) >= MovingAverage[MA,Close,3,0,D,1]) AND ((ExpMovingAverage[EMA,Close,3,0,D,2] / ExpMovingAverage[EMA,Close,8,0,D,2]) < MovingAverage[MA,Close,3,0,D,2])
FYI, the code you posted compared yesterday's EMAs to the MA 3 days ago... that may be why it's not working.
<<its time to reconsider my reluctance to short!>>
Syko, if you don't want to go short, you can trade inverse ETFs. Some of these are leveraged, and some don't have great volume, so they can be tricky to trade.
DDG DUG GLL CMD SMN SZK RXD RHO SCC TLL SDP SRS FAZ SEF SKF RFN SSG TYP REW RTW DPK UDN EDZ BGZ MWN TZA DOG MYY PSQ RWM SH SBB DXD MZZ QID SDK SJL SFK SJF TWM SKK SJH SDS SDD RRZ RSW RMS SCO ZSL TYO TMV TBT PST ERY REC EFZ SIJ AGA BOM DEE DRR DTO DZZ
The volume to average volume comparison becomes more accurate as the day goes on. The TAAV calc evens that out by time-adjusting the ratio. For example, if the stock normally trades 200,000 shares in 30 mins and it's traded 400,000 shares by 10 AM, that's difficult to perceive using the naked eye or by comparing volume to average volume, but the TAAV value would show up as a 2 - or double the normal volume for the timeframe.
If you'd like to discuss the virtues of the TAAV code that I posted, then we can do that. Oddly enough, I don't use it all the time, but I should. It's a good data point.
<<i thought a stock with a TAAV of 4.5 two hours into the day >>
And just a point of clarification here... the time of day is immaterial when looking at that ratio because it's already time-adjusted. The primary goal that I had when I developed it was to overcome the issue of how to compare today's volume to average volume.... like you can't do that with just the plain Volume field. I mean you can, but it doesn't have the proper context around it since volume accumulates throughout the day. Hope that makes sense.
I would prefer that we stay on the topic of StrategyDesk, or at least strategies... LOL.... but I'm sure we'll veer off course from time to time.
Hey Tony, tell me what you think about Shannon's concept of playing into an existing trend... trend being 3 MAs in "fan" formation? Like MA fan on the week, fresh cross on the day...
Welcome HI2009!
Glad you found your answer. I've never studied Fibonacci, but it's on my list of stuff to learn about.
Happy Trades!
Talking stocks and how to find the best trades is completely fine... that's kinda what we're here for... LOL.
The only bad thing about ATR is that it includes gaps, but as with everything else, it's more about knowing what you're looking at than trying to find perfection.
LOL... I thought this strategy was based largely on bollies... can you see why I'd think that?
http://investorshub.advfn.com/boards/read_msg.aspx?message_id=37485790
LOL... you know I don't know what a C&H looks like... much less an inverted one.
Yep, that's a gap! Very nice...
I've been told my messages are like birds, cause they come in flocks...