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

Notification

Icon
Error

Options
Go to last post Go to first unread
Carbonmimeti  
#1 Posted : Monday, February 15, 2016 6:53:12 PM(UTC)
Carbonmimeti

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2010(UTC)
Posts: 24

Thanks: 1 times

I have formula with INPUT for LLV;when I run exploration,it run with minimum value of Input?thank's in advance

 

mstt  
#2 Posted : Tuesday, February 16, 2016 8:32:18 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Carbonmimeti Any indicator called using the Fml() or FmlVar() functions in an exploration will only supply or recognize the "default" value from all Input() functions in the indicator. The user-set value or values only apply when the source indicator is plotted on a chart. For all other uses (such as an exploration or expert) only the default Input() value will be used. Input( "PROMPT TEXT", MINIMUM VALUE, MAXIMUM VALUE, DEFAULT VALUE); The Minimum and Maximum values allow flexibility for any indicator using this function, but the indicator can only deliver the DEFAULT VALUE to an exploration or expert. If you want the exploration to use a set value then the DEFAULT VALUE must be set accordingly before you run the exploration. If this doesn't help then please supply more details about the problem. Roy
thanks 1 user thanked mstt for this useful post.
Carbonmimeti on 2/17/2016(UTC)
Carbonmimeti  
#3 Posted : Wednesday, February 17, 2016 3:19:23 PM(UTC)
Carbonmimeti

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2010(UTC)
Posts: 24

Thanks: 1 times
very good answer...thank you very much Enrico
gabibbo  
#4 Posted : Saturday, May 7, 2016 1:40:56 AM(UTC)
gabibbo

Rank: Member

Groups: Registered, Registered Users
Joined: 1/4/2006(UTC)
Posts: 21

Thanks: 1 times

Could 'GV' dll be able to solve the 'only default value' problem in explorations or at least to help somehow ? 

... I've been thinking so, yet have never done any try in this sense.

If an 'OPT' function existed, maybe it would do the trick... ?!?

Mark

 

 

 

Originally Posted by: mstt Go to Quoted Post
Hi Carbonmimeti


Any indicator called using the Fml() or FmlVar() functions in an exploration will only supply or recognize the "default" value from all Input() functions in the indicator. The user-set value or values only apply when the source indicator is plotted on a chart. For all other uses (such as an exploration or expert) only the default Input() value will be used.

Input( "PROMPT TEXT", MINIMUM VALUE, MAXIMUM VALUE, DEFAULT VALUE);

The Minimum and Maximum values allow flexibility for any indicator using this function, but the indicator can only deliver the DEFAULT VALUE to an exploration or expert. If you want the exploration to use a set value then the DEFAULT VALUE must be set accordingly before you run the exploration.

If this doesn't help then please supply more details about the problem.

Roy
mstt  
#5 Posted : Saturday, May 7, 2016 2:58:30 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Mark I don't have enough information on what you're trying to do to give a definite "Yes" or "No". If you have an example that you're trying to solve involving an indicator and an exploration then please post the details, or at least a helpful overview. Where I've found the GV DLL to be particularly helpful in explorations and systems is to set up required values in Column A (or Buy Long in the system tester) and saving (SET) that value as global variable. From there you can GET that value at the beginning of any subsequent exploration column or system test window. As I see it this works because MetaStock is a purely sequential language, and every procedure is sequential as well. By this I mean that Column A is always processed before column B, and Column B is always processed before column C. Bar by bar is sequential, function by function is sequential, variable by variable is sequential, and so on. Importing a constant into an exploration from an Input() function in an indicator should be able to pick up the user value but I need to check that. I'll do some testing and see what can and can't be done. Roy
mstt  
#6 Posted : Saturday, May 7, 2016 4:48:15 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Mark Here’s an example of how you might go about modifying any custom indicator so that one or more user periods can be imported into an exploration as a constant value for any column formula. The indicator below is just a simple example. In reality you can create your own constant indicator to deliver any single constant, or up to 6 constants if needed, bearing in mind that only 6 Input() functions can be used in a MetaStock indicator. {New Indicator} {GV Set Periods} Constant:=Input("GV Set Periods", 2, 999, 10); Periods:=ExtFml("GV.SetVar","Periods",Constant); ExtFml("GV.GetVar","Periods"); Once the Global Variable has been created (by dropping the indicator onto any chart) that same variable can then be called by any other tool, including explorations, experts and system tests. {Your exploration} {ColA:} Periods:=Last Value(ExtFml("GV.GetVar","Periods")); Add your own code after the Periods parameter and do the same for any other columns if necessary. The reason for using LastValue() around the Global Variable GetVar function is to force the Periods parameter to be considered as a constant. If a “GV Set Periods” indicator is used then there’s no need to worry about a set sequence for getting the Periods parameter to a window or column of any tool. However, If a Global Variable is created in any tool other than the Indicator Builder the GV SetVar function must have a higher priority than subsequent windows or columns. That means that the GV SetVar function must create the GV in column A, and subsequent columns should use the GV GetVar function to access the constant. Hope this helps Roy
thanks 1 user thanked mstt for this useful post.
gabibbo on 5/7/2016(UTC)
gabibbo  
#7 Posted : Saturday, May 7, 2016 7:29:55 PM(UTC)
gabibbo

Rank: Member

Groups: Registered, Registered Users
Joined: 1/4/2006(UTC)
Posts: 21

Thanks: 1 times

Thanks a lot, Roy.

 

Yes, GV set/get dll functions are much more useful and versatile than the basic Input:=(prompt...).

You wrote a very understandable example, now I'll have to find out what the Gv clean function is for by myself.


Thanks again and have a good weekend.

Mark

   

mstt  
#8 Posted : Saturday, May 7, 2016 8:18:51 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Mark The CLEAR function deletes all data stored by the GV if memory serves me correctly. From what I recall the CLEAR has little if any value. I found it to be less than helpful and have avoided it for years. Here's some other facts that you might not know. It can store up to 100 variables. Multiple GV DLLs (different names such as GD, GL, GS etc.) can be used to increase the number of stored variables. Data from individual price bars can be accumulated across a portfolio. The down side of doing this is that ALL securities must have the same number of bars and generally identical dates and time stamps. Otherwise the data becomes corrupted and is entirely useless from that point on. Roy
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.