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

Notification

Icon
Error

Options
Go to last post Go to first unread
brunor  
#1 Posted : Tuesday, April 10, 2012 10:14:15 AM(UTC)
brunor

Rank: Member

Groups: Registered, Registered Users
Joined: 9/7/2011(UTC)
Posts: 17

I am trying to calculate the following breadth indicator: 100DMA:= ExtFml( "Breadth Indicator.CloseAboveMAPercentFROMFOLDER","C: rading Data\Breadth Indicators\All Lists\Markets"); The resulting error from Metastock explorer is: "The text that begins with this quote is not being used in a valid location." The file path is a valid location and is used with other breadth indicators. And I have run the breadth calculation using FIRE. Your assistance would be appreciated.
jjstein  
#2 Posted : Tuesday, April 10, 2012 11:17:25 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Have never used the "included" functions from FIRE; instead, I calculate that stuff directly, using the SECURITY() function; that way, the data can be opened as a chart and compared to the indicator plot, to make sure the indicator has the right code.
Code:

ADV:=Security("\METASTOCK DATA\BREADTH INDICATORS\DJI\1004",C);
DEC:=Security("\METASTOCK DATA\BREADTH INDICATORS\DJI\1024",C);
ADV-DEC;


brunor  
#3 Posted : Tuesday, April 10, 2012 2:24:39 PM(UTC)
brunor

Rank: Member

Groups: Registered, Registered Users
Joined: 9/7/2011(UTC)
Posts: 17

Thanks for your response Johnathan. The FIRE breadth calculator I posted is supposed to calculate the percentage of securities (within a basket of stocks) that closed above their 100-day MA. I don't think this can be accomplished with the security() function.
wabbit  
#4 Posted : Tuesday, April 10, 2012 4:29:26 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)
You've omitted the MA periods from the external function call:

Code:
 ExtFml( "Breadth Indicator.CloseAboveMAPercentFromFolder", Moving Average Periods, Folder Name) 


So your call should look like:

Code:
100DMA:= ExtFml( "Breadth Indicator.CloseAboveMAPercentFromFolder", 100, "C: rading Data\Breadth Indicators\All Lists\Markets");




wabbit [:D]

jjstein  
#5 Posted : Tuesday, April 10, 2012 6:27:44 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Using the FIRE ExtFml() or the MetaStock Security() function are two ways of doing exactly the same thing.

If you use Windows Exploere to look in the folder for which you had FIRE calc the breadth data, you should find both *.DAT and a matching *.TXT file. The *.DAT will have a SYMBOL which is a "code" of the parameters you choose to calculate, while the NAME will be the same as the name of the *.TXT file, complete with ".txt" at the end.

So, if you wanted to plot the NYSE Index and your own custom Advance/Decline line, the scope would be something like this:

Index: \METASTOCK DATA\INDICES & INDICATORS\Us & Canadian Indices\.NYA

Symbols: \METASTOCK DATA\Stocks by Exchange\New York Stock Exchange\

FIRE data: \METASTOCK DATA\BREADTH INDICATORS\NYSE\

The FIRE addon makes the calcs you told it to, and stores the data in a sub-folder of BREADTH INDICATORS. If you use MetaStock's FILE -- OPEN and view the folder contents, you will see the codes (Symbol) and what they mean (Name):

Advancing Issues: Symbol 0004, Name NUM_CLOSE_ABOVE_YESTERDAYS_CLOSE.TXT
Declining Issues: Symbol 0024, Name NUM_CLOSE_BELOW_YESTERDAYS_CLOST.TXT


You could open those files directly, without the need to write an indicator. You can also plot indicators, like a moving average, then drag that plot to another chart, if you wish.

However, it should make no difference, When writing an indicator, whether you use the FIRE ExtFml() or the MetaStock SECURITY() function -- the following should plot the same:


Code:

_Example1

x1:=ExtFml("Breadth Indicator.AdvancingIssuesNumberFromFolder","NYSE");
x2:=ExtFml("Breadth Indicator.DecliningIssuesNumberFromFolder","NYSE");
Mov(x1-x2,100,S);



Code:

_Example2

x1:=Security("\METASTOCK DATA\BREADTH INDICATORS\NYSE\0004",C);
x2:=Security("\METASTOCK DATA\BREADTH INDICATORS\NYSE\0024",C);
Mov(x1-x2,100,S);


brunor  
#6 Posted : Tuesday, April 10, 2012 6:28:01 PM(UTC)
brunor

Rank: Member

Groups: Registered, Registered Users
Joined: 9/7/2011(UTC)
Posts: 17

Both options from wabbit and Johnathan worked perfectly. Thank you very much for your responses.
Users browsing this topic
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.