[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Are there loop functions in Metastock?



PureBytes Links

Trading Reference Links

cobalt_cannon wrote:

> Not sure how much any of you are into programming
> but I'm hoping you can answer this question or point me in the right
> direction where I can get assistance.
>
> I have done a lot of computer programming and am familiar with quite
> a few languages and have been delving into the Metastock Language. 
> Maybe I'm missing the obvious but I don't seem to be able to find
> any loop functions.
> In all other languages I've been involved with you have a least a few
> different types of loops.
>
> I have found the "ref" function that allow you to reference a period
> prior to the current one (say 1 day ago, or 10 days ago) but I'm
> after loop
> functions.
>
> For example if I want to write a function that accepts dynamic input
> from the user and go through data for the past 10 days I want to
> write a loop that traverse the data backwards one day at a time and
> performs calculations
> on that data.
>
> So in English the function would do the following:
>
> Prompt user for number of days to traverse.
> User inputs the number 10 and this is assigned to a
> variable "num_days".
> Define a variable "counter" and initialise it to 1.
> while "counter" <= "num_days" do the following:
>    get price data for day that is "counter" number of days prior to
> today.
>    do whatever you want with this data .. bla bla bla
>    "counter" gets incremented by 1 and go back up to "while"
> statement
> end of loop
>
> So, the above code would traverse through the data for the number of
> days the user has entered and then exit when the loop test fails.
>
> If you are into programming a little you'll know what I mean and if
> not then I hope I've explained things well enough.
>
> Is there another plug-in that enables these types of features or do
> they have to be done outside of Metstock via dll's or do I need to
> get an add-on program or have I just missed how this is done
> altogether.
>
> Thanks in advance
>
> CC
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> click here 
> <http://rd.yahoo.com/M=194081.3551198.4824677.1261774/D=egroupweb/S=1705375617:HM/A=1663535/R=0/SIG=11ps6rfef/*http://www.ediets.com/start.cfm?code=30504&media=atkins> 
>
>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
> <http://docs.yahoo.com/info/terms/>.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Coral Calcium for Greater Health. 1 month supply - $23.95
(1 bottle, 90 tablets, 400mg each with Magnesium & Vitamin D)
http://www.challengerone.com/t/l.asp?cid=2805&lp=calcium2.asp
http://us.click.yahoo.com/mcIe3D/v9VGAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/