Click here to Login





                                                   Comp Function

  0

0
Stefan Kroscen
2011-05-30 18:34:37


The comp function has a parameter to filter by stock symbol. I can't find any documentation on it.... how do you use it? I would like to filter it to one symbol (ex. SPY)


Thanks!



QuantShare
2011-05-31 07:36:23

  0

Best Answer
The description of this parameter is provided in the tooltip that appears when type the "Comp" function (4 of 4)

In this parameter, you can specify the name of a list of symbols (You can create lists using the tool "Symbol" -> "Symbols View")

Example:
p = Comp(close > open, "avg", 1, 1, "NASDAQ Stocks");

If you specify only one symbol then the composite calculation will be based on only one stock. I don't think you want to do this.



Stefan Kroscen
2011-05-31 21:23:29

  0

Thanks, that works!

I do understand that the purpose of the comp function is to combine results across multiple symbols. But I don't know of another way to make the default symbol a function works with other than the symbol the simulator is currently evaluating; so it looks like the comp function might meet my needs in that regard.



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
    News parser function
    Advanced Quotes and Custom Databases Function
    Swing Point Function (SP)
    NORMDIST - Normal Probability Density Function
    Day of week and Week number function

    How-to Lessons
    Difference between the watchlist and the screener tools
    How to plot two different time frames in the same chart
    How to set order type of a trading system programmatically
    How to display the bar index of a stock on a chart
    How to screen for stocks having a high correlation with the Dow J...

    Related Forum Threads
    Comp Function in Trading System Rules
    comp function not working ok in 2.0.2?
    comp function or equivalent does not seem to be working
    Logging the Comp() function
    Problems with the Composite Function

    Blog Posts
    The 'inside period' function
    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...
    How to create the advance/decline market breadth indicator









    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 © 2025 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.