[amibroker] Re: Trading system switch based on certain criteria.

 


Here is a shell switch you can build on.  

You can easily extend this to however many Trading systems you like.

Note.  If you are encapsulate your trading systems into function calls, I've found  variables behave differently when passed as input to a function. They seem to be treated as a different type of variable.  The debugging tools available, dont allow for the identification of variable  issue.  Typeof()    doesnt identify any differences.   


One way  around this issue is to use StaticVarset()  and StaticVarget(). 

This is one of the quirks of Amibroker that I've found.  





// Default selection is Trading system 1  ( selection 0)
TS = ParamList("Select Trading System",List="Trade System 1|Trade System 2",0);


// Select  Trading System to use (Invoke Trading System via a function call) =====
switch(TS)
{
case("Trade System 1"):
    TradeSystem1(var1 , var2);
break;

case("Trade System 2"):
      TradeSystem2(var1 , var2);
break;
}  // end of switch 



__._,_.___

Posted by: G <georgerai@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

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