Click here to Login





                                                   Composite Function

  0

0
allan nathan
2015-08-18 17:11:40


Hi,
I am working with the composite function and have read thru the examples you have provided.I am still unsure how to reference another list of stocks to create an
Advance Decline index. I have a watchlist named SP 500,and I would like to reference it while running a simulation on another list of stocks..I created a basic AD line and 2
moving averages.I use a crossover of the adv -Dec as a market timer. I then use the setsimlongrank to purchase the strongest stocks.

My specific question is how do I compute the Adv Dec from my watchlist Sp 500 if I am backtesting another list?

dif=comp(close>ref(close,1),"sum"); // adv
baddif=comp(close<=ref(close,1),"sum"); //dec
adl=dif-baddif; // adv-dec
shortdif=sma(adl,13); // 13d ma
longdif=sma(adl,200); // 200d ma
a1 = perf(close,66); // Performance of stock for the last month
strength=a1;

buy=cross(shortdif,longdif);
SetSimLongRank(strength); // Rank stocks by their performance

sell=cross(longdif,shortdif);

Thanks,

Allan



QuantShare
2015-08-19 03:49:57

  0

Best Answer
Here is how:

dif=comp(close>ref(close,1),"sum", 1, 1, "Symbols List");

The symbols list must be the name of a list of symbols (Symbol -> Symbols View)



allan nathan
2015-08-19 09:14:58

  0

hi,
It seems that you do not simply type in the watch list and need to create a list.
I went to Symbols>Create a list of symbols>add symbols by filter >create.That
did not work..

it seems to create the list I had to go to Symbols>symbol view>create a new symbols filter..

I believe that is correct?


allan







QuantShare
2015-08-20 03:51:35

  0

Hi,

That is what I have specified in my previous message (Symbol -> Symbols View)
You should create a list there.



allan nathan
2015-08-20 12:03:41

  0

yes,but i wasnt aware that there was an option to right click and create a list:)


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Number of IPOs per Day - Trading Composite
Maximum Drawdown Composite Indicator
Short selling composite
Market Composite Index based on the Sharpe Ratio
Keltner Channel Market Composite

How-to Lessons
How to filter stocks in a market composite
How to create a composite index/indicator
Difference between the watchlist and the screener tools
How to import trading items from other accounts
How to plot arrows below/above candlesticks on a chart

Related Forum Threads
Composite Function
Problems with the Composite Function
Stock or industry relative strenght : Indicator or composite ?
Percent Rank Function Needed
Creat a Composite Index from few stock symbol

Blog Posts
How to create market indicators using the composite function - Pa...
How to create market indicators using the composite function - Pa...
How to create market indicators using the composite function - Pa...
Create a stock index or a trading indicator using the composite t...
How to create a trading system, screen and composite using earnin...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.