[amibroker] Turning array into a static variable

 

Hello Traders.


My goal is to use the correlation function in Amibroker but use an array for the "period". Since it needs to be a static value I tried using the staticvarget but I am clearly using it wrong as it's not working. 


Can you please advise from the code below.


period = "some number determined by combinations of different arrays"

staticperiod = StaticVarGet( "period");// I thought this would turn the array into a temporary static number.


correlation("C", foreign("EURJPY", "C"), staticperiod)

 

But I get an error saying the staticperiod cannot be zero or null.


Please help!

__._,_.___

Posted by: samysosa85@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? 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/


.

__,_._,___


EmoticonEmoticon