Click here to Login





                                                   C# CODE

  0

0
Gilari Decosta
2012-09-08 19:18:28


Sir.
Is it possible to use following code in c# script in tools plugin (script editor) ?

double[] x = chart.ChartData.GetTimeSeries("x");
openprice = x[index];

where x= sar(0.04, 0.2);(in chart).

When I used the same to modify a script to replay , I got an message that "INDEX WAS OUTSIDE THE BOUNDS OF ARRAY".
HOW CAN I RECTIFY SAME ?
PLEASE ADVICE ME.
WITH THANKS
DECOSTA



QuantShare
2012-09-10 16:41:57

  0

You cannot use indicators ("sar" for instance) in the global script (script editor)


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
US Stock symbols - CUSIP
Adaptive Asset Allocation Butler V1.3 AMM
Bleu Stochastic
Euronext Paris - Historical Quotes
IMF Commodity Prices

How-to Lessons
How to run a screen or a watchlist from a script
How to associate an index with a list of stocks
How to plot support and resistance lines automatically
How to display the bar index of a stock on a chart
How to rename a ticker symbol

Related Forum Threads
Newby's questions -symbol lists, code etc. ...
code for roc of certain script
code to get todays date
Code for built-in TA functions
Building Trading Algorithms Without Writing Code (features)

Blog Posts
Create custom metrics for the statistical data analysis tool
Update Chart Layout based on Active Ticker Symbol - Part 2
Money Management: Optimize the scale-in strategy
Inverse Fisher Transform: Indicator, composite and trading system
Display several stock market charts with one click









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.