Click here to Login

                                                   Calling a Function from another Function


2010-08-29 17:59:03

How do you call one C# function from another C# function without using the Formula system?

If the vector-based-compiler must be used, is it possible to pass a VectorD to a formula?

For example: How would I create a moving average (using the function) of a VectorD in a function?

Thanks very much

2010-08-29 20:23:38


Best Answer

yes it is possible to pass a VectorD to a formula.

Here is an example:

QSFormula formula = cFunctions.CreateFormula("a = myfunction(c);");
formula.SetParameter("c", myVectorD);
VectorD myNewVectorD = formula.GetVectorDouble("a");

2010-08-29 20:51:04


Thanks, great!

No more messages


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"


Trading Items
Choose function
Day of week and Week number function
Advanced Quotes and Custom Databases Function
News parser function
Swing Point Function (SP)

How-to Lessons
How to add trades from one portfolio to another one
How to hide a trading indicator from a particular time frame
How to import trading items from other accounts
How to copy the data/settings of an account to another account
How to generate buy/sell signals from a trading system

Related Forum Threads
Composite Function
Interpretation of " DRAWDOWNEQ" function
Count() with STDdev function anomoly
Optimizable Fibonacci function
sp() function

Blog Posts
How to create market indicators using the composite function - Pa...
How to create market indicators using the composite function - Pa...
The 'inside period' function
How to create market indicators using the composite function - Pa...
How to Send Commands to QuantShare from Excel or Other Applicatio...

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2021
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.