Click here to Login

                                                   Learning to program QuantShare - how to begin


2011-04-20 10:45:00

I would like to learn the quantshare language.
But how to begin.

OK, lets see how the others have done it:
When I look at the formula for "Average true range" i see only.

indicator = Atr(14);

But where is the atr function coming from?
Where can i see the source code for atr?

Is there any document describing how to program simple indicators/functions?

2011-04-20 12:31:28


In "Help" -> "QuantShare Lessons", there are some lessons that introduce you to the QuantShare Language.
You can also find info in the CHM or PDF documentation files.

In your example, the "ATR" is build-in function, you cannot see its source code.
If you want to create your own indicator, select "Tools" then "Create Functions". More info can be found in the documentation.

There are hundreds of custom indicators in the sharing server, you can download some of them and see how they are implemented.

2011-04-20 13:23:05


Even the first test does not work.

When I copy the example to the script, QS changes
for (int i=0;i


for (int i=0;i<RESULT.LENGTH;i++

and doesnt compile. Neither C# nor JScript.

2011-04-20 14:21:04


Sorry. I will fix this lesson.

C# is case-sensitive, so the formula should be:

for (int i=0;i < result.Length;i++)

2011-04-21 04:33:49


2011-04-21 05:47:26



I have already "programmed" my first indicator (close - param1) LOL.
I will continue.....


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
How far are the close prices from the support line
Historical Index Composition
Basic Portfolio Measures
Set Global Variable
EODData Daily Import

How-to Lessons
How to run QuantShare offline
How to download Portfolio123 data into QuantShare
How to improve the performance of QuantShare databases?
How to use QuantShare with Metastock data
How to install the previous version of QuantShare

Related Forum Threads
How to backup an entire QuantShare account
How to change the quantshare login in to other PC?
How to create a watchlist of scrips that are in an intermediate u...
How to Backtest a WatchList
Future Cost of Software Program

Blog Posts
How to use QuantShare screener to trade penny stocks
How to use the new Market Regimes Feature in QuantShare Trading S...
How Does QuantShare Work?
How to Run QuantShare without UAC Prompts?
How to Automatically Import Local Data Into QuantShare

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

Copyright 2018
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.