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

Notification

Icon
Error

Options
Go to last post Go to first unread
uasish  
#1 Posted : Friday, July 7, 2006 1:57:51 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
Respescted Wabbit, As you have developed :="if(i<=1) l_fMA = l_psData->pfValue; else l_fMA = (a_psResultRec->psResultArray->pfValue[i-1] * (1.0 - l_fPct)) + (l_psData->pfValue*l_fPct);..........." Kindly help me in the following code ;keeping the percentile factor intact , how to avoid PREV or by pass with some other method to keep the previous embeded value of the earlier closes intact . ema:=C*.382+PREV*.618; ema1:=C*.618+PREV*.382; ema1-ema Regards Asish
wabbit  
#2 Posted : Friday, July 7, 2006 2:08:43 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)
This bit is written for an external code in C++:
Quote:
if(i<=1) l_fMA = l_psData->pfValue; else l_fMA = (a_psResultRec->psResultArray->pfValue[i-1] * (1.0 - l_fPct)) + (l_psData->pfValue*l_fPct);..........."
and I have had too much wine to look objectively at this tonight, but yuo have infact rewritten the formula for Exponential Moving Averages, which is already built in to MS. Your first period is 4. 2356 and the second is 2. 2362 wabbit :D :boire:
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.