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
SocialPicks Analysis
RSI + SMA(200) + Hurst v001
Updating Margin Factor During Drawdown
Currency Mgmt v 0.9
Big Up Gap

How-to Lessons
How to run a screen or a watchlist from a script
How to plot the relative performance of several stocks/indices
How to plot the number of stock tweets per day
How to execute a script at regular intervals
How to hide a trading indicator from a particular time frame

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
Beta release
Introduction to the Events Monitor Tool
How to Import Metastock data into QuantShare
Industry Analysis - How to Compare Stocks with their Industries
How to Backtest Each Stock or Asset Individually









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.