logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
mozillan  
#1 Posted : Saturday, March 31, 2007 2:44:49 PM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

Dear All!!

I want to analyse the best time to buy/sell any scrip. I take the difference between a 5 day SMA and a 20 day SMA and analyse the Close 5, 10, 15... days after the current date. How can I do it? Do I create an exploration or an En. System Tester test? Also I want to analyse this for all securities in my database. Thanks.

wabbit  
#2 Posted : Saturday, March 31, 2007 7:21:42 PM(UTC)
wabbit

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)
Start by getting the logic right. You cannot trade on future data so why look there?

Think about your problem more like this:
Compare the CLOSE of the current bar with the difference of the 5SMA and 20SMA 5 bars ago, 10 bars ago, 15 bars ago etc.

This is all easily achieved with the Ref(data, -prds)



wabbit [:D]


mozillan  
#3 Posted : Sunday, April 1, 2007 5:08:34 AM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

Dear Wabbit,

The idea is the same, i.e., analyse when to buy/sell- when the 5 SMA is a certain percentage above or below the 20 SMA. But how to get it done? If I compare the above with the current close, or a close a certain amount of days back, I still need to know what the best probability is (for all scrips meeting my other criteria). Kindly brainstorm a little more. Thanks for the prompt reply.

*PP  
#4 Posted : Sunday, April 1, 2007 6:55:33 AM(UTC)
*PP

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/1/2006(UTC)
Posts: 135
Location: Romania

mozillan wrote:

Dear Wabbit,

The idea is the same, i.e., analyse when to buy/sell- when the 5 SMA is a certain percentage above or below the 20 SMA. But how to get it done? If I compare the above with the current close, or a close a certain amount of days back, I still need to know what the best probability is (for all scrips meeting my other criteria). Kindly brainstorm a little more. Thanks for the prompt reply.

mozillan,

Usually optimizing is not a good thing and most people know that and don`t use optimizing parameters in their codes; what they do not understand is that optimizing is useful without the purpose of finding the best case parameters but for something wich gets pretty close to your problem and it is not curve fitting. The answer to ur problem is to use system tester.

mozillan  
#5 Posted : Sunday, April 1, 2007 7:33:34 PM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

*PP,

I know I am optimizing the parameters, but sometimes, using other confirming indicators, it is possible to pick winners. So in System Tester, I create a new simulation titled "MA % Optimization" [;)] and then do....what?

*PP  
#6 Posted : Monday, April 2, 2007 2:22:19 AM(UTC)
*PP

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/1/2006(UTC)
Posts: 135
Location: Romania

...create a buy formula for calculating the percentage difference between the two moving averages and that will be equal with a opt1 parameter (the percentage required for finding the best probability). Of course u must design an exit (sell rule) and if u want to sell after a certain number of days it will be pretty diffcult with MSFL unless u have some external dll with a time stop function, but the only external dll wich i know and has such a function is tradesim.dll, maby others can help here.
mozillan  
#7 Posted : Thursday, April 5, 2007 5:14:27 AM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

Dear *PP,

Thanks for getting me started. As for using external dlls, I am a bit too raw for that kind of advanced stuff.

*PP  
#8 Posted : Thursday, April 5, 2007 5:26:33 AM(UTC)
*PP

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/1/2006(UTC)
Posts: 135
Location: Romania

my pleasure mozillan.

cheers

Users browsing this topic
Guest (Hidden)
Similar Topics
look forward testing - ref(c,1) ? (MetaStock)
by manatrader 6/24/2009 1:30:29 AM(UTC)
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.