Rank: Member
Groups ready for retrieval: Registered, Registered Users Joined: 4/21/2005(UTC) Posts: 25 Location: Los Angeles, CA
|
I understand that the Peak function uses the zig zag indicator which should not be used when backtesting a trading system because the peaks are not verified right away and trading signals can disappear. But wouldn't the peak in function "c>peak(1,c,12)" be a verified peak since the buy signal does not present itself until the price dropped 12% from an unverified peak (which should now be verified after the 12% drop) then came back up at least 12% for the buy signal? I'm about to take this out of my system but I want to be 100% sure I need to.
many thanks.
Mike Simpson
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The Golden Rule is to never use lookahead indicators in support of real life trading decisions; HOWEVER there are a very few number of instances where they MIGHT be used; it is very dependent on very specific circumstances and the code used to implement must be very precise.
One way to tell if your code in your exploration/system test code is workable for trading, do a "bar replay". As MS doesn't have this functionality built-in, you have to do this manually by loading data bar by bar -- its painful to execute, but necessary.
The ZZ indicator and its derivatives can be "validated"; do a seach of the forum for the code to do so, and see if it is applicable to your code conditions.
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
|
|
|
|
Rank: Member
Groups ready for retrieval: Registered, Registered Users Joined: 4/21/2005(UTC) Posts: 25 Location: Los Angeles, CA
|
Doing the bar by bar play is exactly was i've been planning on doing but i'm definitely not looking forward to doing it. So far i've ran an exploration on the S&P 500 over the last 500 days, listed all stocks that had at least 7 buy signals on them (Which is 17 stocks & 129 buy signals), I planned on deleting all historical data on those stocks and update as needed to test just to make sure no future data was used. Either that, or just delete data back a year or so, explore, make a list of all the stocks with signals, do that for every day, then go back and review all the charts once everthing is back up to date and see if all the signals are in the same place....Hmm, maybe the 2nd way would be easier. Is there another way to load data bar by bar that i'm not thinking of? I knew it was something I was going to have to do no matter what.
The ZigZag Peak Validation code is above my head.
Many thanks for the help,
Mike Simpson
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Double click on te date axis, set the last bar loaded and last bar visible dates, one bar at a time from whatever date you want to start testing from.
wabbit [:D]
|
|
|
|
Rank: Member
Groups ready for retrieval: Registered, Registered Users Joined: 4/21/2005(UTC) Posts: 25 Location: Los Angeles, CA
|
AAHHHH!!!! Oh my god that is sooo much easier than what I was going to do.
Thank you!!
|
|
|
|
Rank: Member
Groups ready for retrieval: Registered, Registered Users Joined: 4/21/2005(UTC) Posts: 25 Location: Los Angeles, CA
|
It is NOO good.
If a peak is formed, the price drops 12% then comes back up and closes above that previous peak, that previous peak has been confirmed for some time so the peak is good. As for the buy signal......When the price comes back up, closes above that previous peak a buy signal pops. If the price does not stay above the previous peak and starts to fall below the peak, the buy signal dissapears.
I'm not sure how long the price has to stay above the peak for it to remain though. I didn't get that far as I figured I'd better spend my time back at the drawing board.
It would be nice to actually see how many signals dissapeared and what those losses would be compared to the signals that remained but that's not going to happen with Metastock since it doesn't come with bar by bar testing.
Metastock has been out for a long time now, I think it's time to put the bar by bar feature in. I'm about to try "another software" that has it but hate to mess with yet another learning curve.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Adrenaline wrote:I'm about to try "another software" that has it but hate to mess with yet another learning curve. Um, that's not going to solve your problem with using Metastock's PEAK() function... You might want to do a search on the forum and see if there are other solutions, or post a description of what you're trying to do, along with your code, and see if anyone can offer another way to solve the problem.
|
|
|
|
Rank: Member
Groups ready for retrieval: Registered, Registered Users Joined: 4/21/2005(UTC) Posts: 25 Location: Los Angeles, CA
|
I know that won't solve my problem. I would just like to use something that I can verify my system day by day which Metastock hasn't implemented yet.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Just thought there might be ways to do your "peak" method, other than using a lookahead function...
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.