Register Login
Forums    February 6, 2012
TradersStudio Forums
Coding inidicators with non-standard data sources
Last Post 03-10-2009 09:55 AM by mur ang. 5 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
David Rooke
New Member
New Member
Posts:22

--
03-09-2009 06:09 PM

    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

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    03-09-2009 06:14 PM

    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.

     

     

    David Rooke
    New Member
    New Member
    Posts:22

    --
    03-09-2009 07: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.

     

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    03-09-2009 09:08 PM
    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.



    David Rooke
    New Member
    New Member
    Posts:22

    --
    03-10-2009 06:08 AM

    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.

     

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    03-10-2009 09:55 AM

    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.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement