Thursday, September 09, 2010     | Register
TradersStudio Forums
Subject: Coding inidicators with non-standard data sources

You are not authorized to post a reply.   
Author Messages
quest
Posts:20

03-09-2009 6:09 PM Alert 

Hi,

If i were to code an indictaor function with two data inputs, neither of which is a tradable what would happen were I to call that function from a system where those two sources are set as Independent1 & 2?

I started coding an indicator like this earlier and suspect that a logical error would be created were I to call it from a System where a tradable market will be part of the data aswell as the two Independents. Am i right?

 

Regards,

Dave

murray
Posts:519

03-09-2009 6:14 PM Alert 

Function MyIndicator(Series1 as bararray, Series2 as bararray)

Use Series1 and Series 2 in your code for the above function.

You can then call the function using

Close of independent1, Close of independent2 for example.

 

 

quest
Posts:20

03-09-2009 7:34 PM Alert 

Ok, so how does one plot that custom indicator in the chart window in order to test it? The dialogue prompts the user as if expecting a parameter when it should be possible to select the input data.

 

murray
Posts:519

03-09-2009 9:08 PM Alert 
Posted By quest on 03-09-2009 7:34 PM

Ok, so how does one plot that custom indicator in the chart window in order to test it? The dialogue prompts the user as if expecting a parameter when it should be possible to select the input data.

Sorry Now I understand what you want.

 

'TradersStudio 2006-2007 All rights reserved
Sub TS_Correlation(CLen)
Plot1(Corel(Input1,Input2,CLen,0))
End Sub

Here an example of a custom correlation indicator. When you add this indicator it will have a property box with two dropdown and let you select a data series on the chart or another indicator  on the chart.



quest
Posts:20

03-10-2009 6:08 AM Alert 

So this means that the parent session needs to have the extra data sries available as child series, correct?

 

Is it possible to chart indictors outside of the confines of a session? I'm thinking about testing here and would like to do that exploration without having to waste time creating meaningless sessions.

 

murray
Posts:519

03-10-2009 9:55 AM Alert 

Yes, the session needs extra data series. Charts can also plot other series on the chart.

In terms of charting without a session you can use the quickchart feature.

You are not authorized to post a reply.
Forums > TradersStudio 2.x > TradersStudio Basic > Coding inidicators with non-standard data sources



ActiveForums 3.6
TradersStudio® Copyright 2004-2010 All Rights Reserved   |  Privacy Statement  |  Terms Of Use