[amibroker] Re: Calculate Multiple Moving Avg net Change [1 Attachment]

 
[Attachment(s) from portfoliobuilder99@gmail.com [amibroker] included below]

// and it can be derived in alternative ways

// for example, compare TheScore with FinalScore

UpTotal = 0;
DownTotal = 0;
FinalScore = 0;
TheScore = 0;

for( i = 5; i < 22; i++ )
{
    UpTotal += MA( C, i ) > ( Ref( MA( C, i ), -1 ) );
    DownTotal += MA( C, i ) < ( Ref( MA( C, i ), -1 ) );
    FinalScore = UpTotal - DownTotal;
}

for( i = 5; i < 22; i++ )
{
    TheScore += MA( C, i ) > ( Ref( MA( C, i ), -1 ) );
    TheScore -= MA( C, i ) < ( Ref( MA( C, i ), -1 ) );
}

// lets explore to confirm it is working as hoped for
Filter = 1;
AddColumn( Close, "Close" );
AddColumn( UpTotal, "UpTotal", 1.1, colorBlack, colorLime );
AddColumn( DownTotal, "DownTotal", 1.1 , colorBlack, colorRose );
AddColumn( FinalScore, "FinalScore", 1.0, colorDefault, colorLightYellow );
AddColumn( TheScore, "TheScore", 1.0, colorRed, colorLavender );

__._,_.___

Attachment(s) from portfoliobuilder99@gmail.com [amibroker] | View attachments on the web

1 of 1 Photo(s)


Posted by: portfoliobuilder99@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Check out the automatic photo album with 2 photo(s) from this topic.
FinalScore.JPG Altenative.JPG

Save time and get your email on the go with the Yahoo Mail app
Get the beautifully designed, lighting fast, and easy-to-use Yahoo Mail today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___

Related Posts


EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv