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

Notification

Icon
Error

Options
Go to last post Go to first unread
meridien  
#1 Posted : Monday, July 6, 2009 8:47:42 PM(UTC)
meridien

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/6/2009(UTC)
Posts: 8

One more question and I stop burdening you for today, I promise.

How to code the following: The standard deviation of the change in price over prior 20 days<0.8

Would the following code be correct?

stdev(sub(c,ref(c,-1)),20)<0.8

Thanks so much for your insights.

wabbit  
#2 Posted : Tuesday, July 7, 2009 7:00:05 AM(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)
Hi meridien,

You don't really need to use the Sub() function, as you can just write:
Code:
C-Ref(C,-1);

which also happens to be the same as the one period rate of change:
Code:
ROC(C,1,$);


One of the best ways to learn how to program your own MS indicators, experts, explorations and system tests is to have several thorough reads through the MS Users Manual. Once this is complete, download the free Equis formula primer from the files section of the forum and work through those exercises. You can always look at the codes built-in to MS to see many other examples of code in action to give you some hints/ideas (some are password protected, but the majority are open for reading/editing).


wabbit [:D]

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.