Click here to Login





                                                   Calling a Function from another Function

  1

0
swalk10
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
Scott



QuantShare
2010-08-29 20:23:38

  1

Best Answer
Hi,

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);
formula.Compile();
VectorD myNewVectorD = formula.GetVectorDouble("a");



swalk10
2010-08-29 20:51:04

  0

Thanks, great!


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
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
Passing date variable from custom drawing tools to custom functio...
Composite Function
Interpretation of " DRAWDOWNEQ" function
Count() with STDdev function anomoly
Optimizable Fibonacci 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...









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.