I need help changing the below moving average cross over trading system to model few ideas. Currently the system works fine as long as I run against a single ticker.
Modification Required:
The system should generate buy and sell signal based on the S&P 500 Index (^GSPC) and trade another ticker (Example -"AAPL").
Any input would be great. Thanks in advance for your help.
// MA Cross over system
SetOption( "InitialEquity", 10000 );
MaxPositions = 1;
SetOption("MaxOpenPositions", MaxPositions );
PositionSize = -100/MaxPositions ;
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = SellPrice = Open;
Vcond = V > 1000000;
Buy = Cross(EMA( Close, 9), EMA( Close, 21)) AND VCond AND C > 10;
Sell = Cross(EMA( Close, 21), EMA( Close, 9)) AND VCond;
Buy = ExRem( Buy, Sell);
Sell = ExRem( Sell, Buy);
Filter = 1;
AddColumn(O, "Open");
AddColumn(C, "Close");
// End of the system
__._,_.___
Posted by: pontric inc <pontricinc@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
**** 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/
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