the trade system doesn't generate the right trades, some are missed
Author: tradercn
Creation Date: 12/6/2011 4:07 PM
profile picture

tradercn

#1
Just for a rough test of two LinearRegSlope crossover and crossunder, however some trades are missed obviously. I don't know the reason. Here is the code.
CODE:
Please log in to see this code.

The index data link is here:
https://docs.google.com/open?id=0B3nvPJ30rJORZjc3OGYxODYtMmYzNi00NTBmLWExNGUtZDg2Mjk4MjIzYWIz

You can see the missed signals a lot. And, ATR trailing stop line is not plotted on the chart successfully.

Could you please figure it out? Thanks.
profile picture

tradercn

#2
The ATR line was not plotted successful, is because LineStyle was set to be Dots. After it was changed, it is ok then. That is a bug. FYI.
profile picture

Cone

#3
There's always a reason for missed trades, and its unlikely to be a bug.

As for the ATR, the 1-pixel Dots are almost impossible to see, but if you change the parameter to 3 or 4 pixels, you won't make that mistake again.
profile picture

tradercn

#4
Thanks Cone. But I don't understand what is the reason for missed trades yet. The logic here is the simpliest, crossover and crossunder are only two trigers. Even I set rules to make the same new strategy, but the same trades are missed as well. Could you please let me know more?
Yes, for ATR line, I changed pixels, it is ok then.
Thanks again for your help.
profile picture

Eugene

#5
What is your position sizing?
profile picture

tradercn

#6
no position sizing, raw profit mode. thanks for your help, Eugene. :)
profile picture

Eugene

#7
Using some Yahoo! symbols, preferably from Dow 30, could you please show a detailed example of what you think is an obviously missed trade?
profile picture

tradercn

#8
with the index data I sent you, on April 13 2007, lrs(50) cross over lrs(100), there is supposed to be a trade signal. August 10 2007, missed trade as well. After that, there are lots missed trades. If you run my strategy with the index data I sent you, you will see that obviously.
I tested SPY, no missed trade so far. Then I went back to the index data, nothing is wrong.
profile picture

Eugene

#9
I have not looked into your downlodable index file but if your index price at the moment is greater than your Raw Profit position size, obviously, you will not get an Alert. Like if Fixed Dollar $5,000 is used and the index (e.g. ^DJIA) is at e.g. 10,000, you're out of cash for that trade. Either bump the size up or choose Shares/Contracts while in RP mode.

Hope that helps.
profile picture

Eugene

#10
btw, added to the Wiki FAQ > Alerts are not triggered.
profile picture

tradercn

#11
You are amazing, Eugene. Kiss you! :)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).