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

Notification

Icon
Error

Options
Go to last post Go to first unread
Jatboy  
#1 Posted : Wednesday, June 10, 2009 9:45:25 AM(UTC)
Jatboy

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 6/9/2009(UTC)
Posts: 1
Location: Singapore

Dear All,

As you can see I am a new bee and apologies if my statements are vague or I am not making too much senseJ

I recently wrote to the formula team that I wish to enter the following values in the MACD- DEMA

· Shorter DEMA Periods: 8.3896

· Longer DEMA Periods: 17.5285

· Number of signal time period: 9.0503

and the repose I got from the formula team is copied between the dotted lines below. The formula team says that I MUST enter a positive whole number . I would like to check if there is some way to enter the numbers in decimals? Any help will be greatly appreciated.

Thanks a lot.

---------------------------------------------------------------------------------------------------------------

The formula limits the longer DEMA periods to 21 or higher so it will always be longer than the shorter time periods. I have altered the formula below to allow the longer time periods to be as low as 15 periods. However, I should point out that any values you enter after the decimal will be rounded for the moving average calculation. Our moving average function does not allow fractional time periods, only positive whole numbers (integers).

shortperiods:=Input("Enter the shorter DEMA periods: ",3,20,12);

longperiods:=Input("Enter the longer DEMA periods: ",15,50,26);

signal:=Input("Enter the number of signal line periods: ",3,50,9);

Dema(C,shortperiods)-Dema(C,longperiods);

Mov(Dema(C,shortperiods)-Dema(C,longperiods),signal,E)

----------------------------------------------------------------------------------------------------------------

wabbit  
#2 Posted : Wednesday, June 10, 2009 8:03:44 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)
Hi Ravi,

Welcome to the Forum.

The built-in MS DEMA() function only accepts integer input. In order to use partial inputs, you'll need to rewrite the logic of the DEMA() function for yourself. This means you would have to rewrite all of the internal EMA components from scratch yourself too. However, my recommendation would be to use the forum.dll EMA function which can accept partial input then use the DEMA logic to write the remainder in MS Formula Language script.

Have a go at writing these codes for yourself, utilising the MS Users Manual and the free Equis Formula Primer (in the Files section of the forum). If you get stuck or have any trouble, post your best attempt at the code here and someone will assist to correct your codes.



wabbit [:D]

P.S. The forum.dll and the Equis Formula Primer are available for free download from the Files section of the forum.

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.