Loading ...
Sorry, an error occurred while loading the content.

Call a User Defined strategy ?

Expand Messages
  • Raymond Walsh
    Hello everyone Is it possible to create & call subroutines (strategies)? Thank you for any pointers or suggestions ray
    Message 1 of 9 , Apr 1, 2009
    • 0 Attachment
      Hello everyone

      Is it possible to create & call subroutines (strategies)?

      Thank you for any pointers or suggestions
      ray

    • tradescripter
      No, there isn t a way to call subroutines or user defined studies/strategies in thinkScript. Everything must be self contained. There is also no looping
      Message 2 of 9 , Apr 1, 2009
      • 0 Attachment
        No, there isn't a way to call subroutines or user defined studies/strategies in thinkScript. Everything must be self contained. There is also no looping capability in thinkScript.
        In order to reference a defined variable, the variable you want to reference must be above the line you are using to reference the variable.
        I had the impression that TOS intended to update thinkScript to be able to call user defined studies, but at the present time, I'm not counting on it. I am hoping that somehow we get a more powerful programing language in the future.
        You can call TOS defined studies inside a user defined study, which can simplify the code a little.

        TRADE scripter


        --- In TOS_thinkscript@yahoogroups.com, Raymond Walsh <rnw2000@...> wrote:
        >
        > Hello everyone
        >
        > Is it possible to create & call subroutines (strategies)?
        >
        > Thank you for any pointers or suggestions
        > ray
        >
      • Ray
        TRADE scripter Thank you for the reply. Is it also true that you cannot reassign a value/variable? -- you must use a temp/scratch variable Assigning only once
        Message 3 of 9 , Apr 2, 2009
        • 0 Attachment
          TRADE scripter

          Thank you for the reply.
          Is it also true that you cannot reassign a value/variable?
          -- you must use a temp/scratch variable

          Assigning only once makes my "if" statements deeply nested (4+ levels)

          ray

          --- In TOS_thinkscript@yahoogroups.com, "tradescripter" <tradescripter@...> wrote:
          >
          > No, there isn't a way to call subroutines or user defined studies/strategies in thinkScript. Everything must be self contained. There is also no looping capability in thinkScript.
          > In order to reference a defined variable, the variable you want to reference must be above the line you are using to reference the variable.
          > I had the impression that TOS intended to update thinkScript to be able to call user defined studies, but at the present time, I'm not counting on it. I am hoping that somehow we get a more powerful programing language in the future.
          > You can call TOS defined studies inside a user defined study, which can simplify the code a little.
          >
          > TRADE scripter
          >
          >
          > --- In TOS_thinkscript@yahoogroups.com, Raymond Walsh <rnw2000@> wrote:
          > >
          > > Hello everyone
          > >
          > > Is it possible to create & call subroutines (strategies)?
          > >
          > > Thank you for any pointers or suggestions
          > > ray
          > >
          >
        • Steve Smegner
          This explains a lot. I have been trying to create my own functions and use those inside another strategy. More specifically I wanted to plot SMA s of 2 user
          Message 4 of 9 , Apr 2, 2009
          • 0 Attachment

            This explains a lot. I have been trying to create my own functions and use those inside another strategy. More specifically I wanted to plot SMA’s of 2 user defined functions. Something like plot sma(MYFunc1,5) and plot SMA(MyFunc2,7).

             

            I suppose I will have to go back to Tradestation or Genesis for now.

             

             

            From: TOS_thinkscript@yahoogroups.com [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of Ray
            Sent: Thursday, April 02, 2009 5:21 AM
            To: TOS_thinkscript@yahoogroups.com
            Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?

             

            TRADE scripter

            Thank you for the reply.
            Is it also true that you cannot reassign a value/variable?
            -- you must use a temp/scratch variable

            Assigning only once makes my "if" statements deeply nested (4+ levels)

            ray

            --- In TOS_thinkscript@yahoogroups.com, "tradescripter" <tradescripter@...> wrote:

            >
            > No, there isn't a way to call subroutines or user defined
            studies/strategies in thinkScript. Everything must be self contained. There is also no looping capability in thinkScript.
            > In order to reference a defined variable, the variable you want to
            reference must be above the line you are using to reference the variable.
            > I had the impression that TOS intended to update thinkScript to be able to
            call user defined studies, but at the present time, I'm not counting on it. I am hoping that somehow we get a more powerful programing language in the future.
            > You can call TOS defined studies inside a user defined study, which can
            simplify the code a little.
            >
            > TRADE scripter
            >
            >
            > --- In TOS_thinkscript@yahoogroups.com,
            Raymond Walsh <rnw2000@> wrote:
            > >
            > > Hello everyone
            > >
            > > Is it possible to create & call subroutines (strategies)?
            > >
            > > Thank you for any pointers or suggestions
            > > ray
            > >
            >

          • tradescripter
            If the user defined study that you want to use as an input to a strategy isn t too long, then you can just add the code to the strategy. I do have to state
            Message 5 of 9 , Apr 2, 2009
            • 0 Attachment
              If the user defined study that you want to use as an input to a strategy isn't too long, then you can just add the code to the strategy. I do have to state however, that I don't use the strategies because I find them to difficult to work with, and not worth the trouble. All a strategy can do is plot an arrow. Well, I can't plot an arrow in a study, but I can plot a dot, so that's a minor difference.

              TRADE scripter

              --- In TOS_thinkscript@yahoogroups.com, "Steve Smegner" <ssmegner@...> wrote:
              >
              > This explains a lot. I have been trying to create my own functions and use
              > those inside another strategy. More specifically I wanted to plot SMA's of 2
              > user defined functions. Something like plot sma(MYFunc1,5) and plot
              > SMA(MyFunc2,7).
              >
              >
              >
              > I suppose I will have to go back to Tradestation or Genesis for now.
              >
              >
              >
              >
              >
              > From: TOS_thinkscript@yahoogroups.com
              > [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of Ray
              > Sent: Thursday, April 02, 2009 5:21 AM
              > To: TOS_thinkscript@yahoogroups.com
              > Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?
              >
              >
              >
              > TRADE scripter
              >
              > Thank you for the reply.
              > Is it also true that you cannot reassign a value/variable?
              > -- you must use a temp/scratch variable
              >
              > Assigning only once makes my "if" statements deeply nested (4+ levels)
              >
              > ray
              >
              > --- In TOS_thinkscript@yahoogroups.com
              > <mailto:TOS_thinkscript%40yahoogroups.com> , "tradescripter"
              > <tradescripter@> wrote:
              > >
              > > No, there isn't a way to call subroutines or user defined
              > studies/strategies in thinkScript. Everything must be self contained. There
              > is also no looping capability in thinkScript.
              > > In order to reference a defined variable, the variable you want to
              > reference must be above the line you are using to reference the variable.
              > > I had the impression that TOS intended to update thinkScript to be able to
              > call user defined studies, but at the present time, I'm not counting on it.
              > I am hoping that somehow we get a more powerful programing language in the
              > future.
              > > You can call TOS defined studies inside a user defined study, which can
              > simplify the code a little.
              > >
              > > TRADE scripter
              > >
              > >
              > > --- In TOS_thinkscript@yahoogroups.com
              > <mailto:TOS_thinkscript%40yahoogroups.com> , Raymond Walsh <rnw2000@> wrote:
              > > >
              > > > Hello everyone
              > > >
              > > > Is it possible to create & call subroutines (strategies)?
              > > >
              > > > Thank you for any pointers or suggestions
              > > > ray
              > > >
              > >
              >
            • tradescripter
              The REC command allows a variable to be updated with a new value. The REC command allows a variable to refer to itself. Because the variable can refer to
              Message 6 of 9 , Apr 2, 2009
              • 0 Attachment
                The REC command allows a variable to be updated with a new value. The REC command allows a variable to refer to itself. Because the variable can refer to itself, it can update itself. It all has to be done in the same line of code.
                The DEF command won't allow the same variable name to be defined a second time. You will get an error msg.
                If you do find a use for the REC command, and it doesn't seem to be working, then I suggest initializing it right up front. Something like this:

                REC VarX = if IsNan(VarX) then 0 else if close > open then 1 else 0;

                In the above example, the variable named "VarX" gets assigned a value of 0 if it's found to be "Not a Number". (Nan) It seems that variables often evaluate to "Not an Number" right at the beginning of the chart, and then for some reason the REC command can't assign a value to the variable. I don't know why that is. I've had many situations where I can't get the results I wanted, but after checking the variable with IsNan() and setting the variable to a number if it is non a number, suddenly makes it work.


                TRADE scripter

                --- In TOS_thinkscript@yahoogroups.com, "Ray" <rnw2000@...> wrote:
                >
                > TRADE scripter
                >
                > Thank you for the reply.
                > Is it also true that you cannot reassign a value/variable?
                > -- you must use a temp/scratch variable
                >
                > Assigning only once makes my "if" statements deeply nested (4+ levels)
                >
                > ray
                >
                > --- In TOS_thinkscript@yahoogroups.com, "tradescripter" <tradescripter@> wrote:
                > >
                > > No, there isn't a way to call subroutines or user defined studies/strategies in thinkScript. Everything must be self contained. There is also no looping capability in thinkScript.
                > > In order to reference a defined variable, the variable you want to reference must be above the line you are using to reference the variable.
                > > I had the impression that TOS intended to update thinkScript to be able to call user defined studies, but at the present time, I'm not counting on it. I am hoping that somehow we get a more powerful programing language in the future.
                > > You can call TOS defined studies inside a user defined study, which can simplify the code a little.
                > >
                > > TRADE scripter
                > >
                > >
                > > --- In TOS_thinkscript@yahoogroups.com, Raymond Walsh <rnw2000@> wrote:
                > > >
                > > > Hello everyone
                > > >
                > > > Is it possible to create & call subroutines (strategies)?
                > > >
                > > > Thank you for any pointers or suggestions
                > > > ray
                > > >
                > >
                >
              • Steve Smegner
                My fault. I misspoke. I meant to say study rather than strategy. I actually have a side question. I noticed that some studies use a period = DAY type of
                Message 7 of 9 , Apr 2, 2009
                • 0 Attachment

                  My fault. I misspoke. I meant to say study rather than strategy.

                   

                  I actually have a side question. I noticed that some studies use a ‘period = DAY’ type of input. I have found DAY, WEEK, MONTH as valid options. Are there others? I was looking at pivot points and fully understand why they use DAY, WEEK, MONTH. But what about default time frame? Is there an option like ‘period = bar’?

                   

                  Back to the original question, I was trying to create a study around pivot points and moving averages. For example the previous day will set the pivot points for the next day. That is why the pivot point studies allow ‘period = DAY’. But when I view the chart intraday I want to add one or more simple moving averages of the pivot point based on the previous X bars. One example might be a 5 bar pivot point moving average. SMA(PP,5).  I have created this for Tradestation and Genesis and was hoping to do this in TOS. I have been using TOS for more than 5 years and would prefer to use TOS for all my trading rather than using 2 platforms.

                   

                  With Genesis I created a pivot point function which computes the pivot point from the previous period which is selectable to be DAY, WEEK, MONTH, BAR. Genesis (and Tradestation) allows me to feed as input to the SMA function any other function whether built in or user created. I already have all the strategies and rules that I like to use around what I am trying to draw on the chart.

                   

                  From: TOS_thinkscript@yahoogroups.com [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of tradescripter
                  Sent: Thursday, April 02, 2009 12:03 PM
                  To: TOS_thinkscript@yahoogroups.com
                  Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?

                   

                  If the user defined study that you want to use as an input to a strategy isn't too long, then you can just add the code to the strategy. I do have to state however, that I don't use the strategies because I find them to difficult to work with, and not worth the trouble. All a strategy can do is plot an arrow. Well, I can't plot an arrow in a study, but I can plot a dot, so that's a minor difference.

                  TRADE scripter

                  --- In TOS_thinkscript@yahoogroups.com, "Steve Smegner" <ssmegner@...> wrote:

                  >
                  > This explains a lot. I have been trying to create my own functions and use
                  > those inside another strategy. More specifically I wanted to plot SMA's of
                  2
                  > user defined functions. Something like plot sma(MYFunc1,5) and plot
                  > SMA(MyFunc2,7).
                  >
                  >
                  >
                  > I suppose I will have to go back to Tradestation or Genesis for now.
                  >
                  >
                  >
                  >
                  >
                  > From: TOS_thinkscript@yahoogroups.com
                  > [mailto:TOS_thinkscript@yahoogroups.com]
                  On Behalf Of Ray
                  > Sent: Thursday, April 02, 2009 5:21 AM
                  > To: TOS_thinkscript@yahoogroups.com
                  > Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?
                  >
                  >
                  >
                  > TRADE scripter
                  >
                  > Thank you for the reply.
                  > Is it also true that you cannot reassign a value/variable?
                  > -- you must use a temp/scratch variable
                  >
                  > Assigning only once makes my "if" statements deeply nested (4+
                  levels)
                  >
                  > ray
                  >
                  > --- In TOS_thinkscript@yahoogroups.com
                  > <mailto:TOS_thinkscript%40yahoogroups.com> ,
                  "tradescripter"
                  > <tradescripter@> wrote:
                  > >
                  > > No, there isn't a way to call subroutines or user defined
                  > studies/strategies in thinkScript. Everything must be self contained.
                  There
                  > is also no looping capability in thinkScript.
                  > > In order to reference a defined variable, the variable you want to
                  > reference must be above the line you are using to reference the variable.
                  > > I had the impression that TOS intended to update thinkScript to be
                  able to
                  > call user defined studies, but at the present time, I'm not counting on
                  it.
                  > I am hoping that somehow we get a more powerful programing language in the
                  > future.
                  > > You can call TOS defined studies inside a user defined study, which
                  can
                  > simplify the code a little.
                  > >
                  > > TRADE scripter
                  > >
                  > >
                  > > --- In TOS_thinkscript@yahoogroups.com
                  > <mailto:TOS_thinkscript%40yahoogroups.com> , Raymond Walsh
                  <rnw2000@> wrote:
                  > > >
                  > > > Hello everyone
                  > > >
                  > > > Is it possible to create & call subroutines (strategies)?
                  > > >
                  > > > Thank you for any pointers or suggestions
                  > > > ray
                  > > >
                  > >
                  >

                • tradescripter
                  I just uploaded a file named, Intraday Pivot Points.txt. It is a study that plots intraday pivot points. Just copy out the code and paste it into a study
                  Message 8 of 9 , Apr 2, 2009
                  • 0 Attachment
                    I just uploaded a file named, Intraday Pivot Points.txt. It is a study that plots intraday pivot points. Just copy out the code and paste it into a study and save it. It allows you to set the period in the number of bars.

                    I don't believe that there is a "bar" period. I did make a post to this group that had code in it that would find what the time frame of the chart was set at.

                    But then you would need to find a way to use that info.

                    find time frame:
                    http://finance.groups.yahoo.com/group/TOS_thinkscript/message/696

                    TRADE scripter

                    --- In TOS_thinkscript@yahoogroups.com, "Steve Smegner" <ssmegner@...> wrote:
                    >
                    > My fault. I misspoke. I meant to say study rather than strategy.
                    >
                    >
                    >
                    > I actually have a side question. I noticed that some studies use a 'period =
                    > DAY' type of input. I have found DAY, WEEK, MONTH as valid options. Are
                    > there others? I was looking at pivot points and fully understand why they
                    > use DAY, WEEK, MONTH. But what about default time frame? Is there an option
                    > like 'period = bar'?
                    >
                    >
                    >
                    > Back to the original question, I was trying to create a study around pivot
                    > points and moving averages. For example the previous day will set the pivot
                    > points for the next day. That is why the pivot point studies allow 'period =
                    > DAY'. But when I view the chart intraday I want to add one or more simple
                    > moving averages of the pivot point based on the previous X bars. One example
                    > might be a 5 bar pivot point moving average. SMA(PP,5). I have created this
                    > for Tradestation and Genesis and was hoping to do this in TOS. I have been
                    > using TOS for more than 5 years and would prefer to use TOS for all my
                    > trading rather than using 2 platforms.
                    >
                    >
                    >
                    > With Genesis I created a pivot point function which computes the pivot point
                    > from the previous period which is selectable to be DAY, WEEK, MONTH, BAR.
                    > Genesis (and Tradestation) allows me to feed as input to the SMA function
                    > any other function whether built in or user created. I already have all the
                    > strategies and rules that I like to use around what I am trying to draw on
                    > the chart.
                    >
                    >
                    >
                    > From: TOS_thinkscript@yahoogroups.com
                    > [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of tradescripter
                    > Sent: Thursday, April 02, 2009 12:03 PM
                    > To: TOS_thinkscript@yahoogroups.com
                    > Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?
                    >
                    >
                    >
                    > If the user defined study that you want to use as an input to a strategy
                    > isn't too long, then you can just add the code to the strategy. I do have to
                    > state however, that I don't use the strategies because I find them to
                    > difficult to work with, and not worth the trouble. All a strategy can do is
                    > plot an arrow. Well, I can't plot an arrow in a study, but I can plot a dot,
                    > so that's a minor difference.
                    >
                    > TRADE scripter
                    >
                    > --- In TOS_thinkscript@yahoogroups.com
                    > <mailto:TOS_thinkscript%40yahoogroups.com> , "Steve Smegner" <ssmegner@>
                    > wrote:
                    > >
                    > > This explains a lot. I have been trying to create my own functions and use
                    > > those inside another strategy. More specifically I wanted to plot SMA's of
                    > 2
                    > > user defined functions. Something like plot sma(MYFunc1,5) and plot
                    > > SMA(MyFunc2,7).
                    > >
                    > >
                    > >
                    > > I suppose I will have to go back to Tradestation or Genesis for now.
                    > >
                    > >
                    > >
                    > >
                    > >
                    > > From: TOS_thinkscript@yahoogroups.com
                    > <mailto:TOS_thinkscript%40yahoogroups.com>
                    > > [mailto:TOS_thinkscript@yahoogroups.com
                    > <mailto:TOS_thinkscript%40yahoogroups.com> ] On Behalf Of Ray
                    > > Sent: Thursday, April 02, 2009 5:21 AM
                    > > To: TOS_thinkscript@yahoogroups.com
                    > <mailto:TOS_thinkscript%40yahoogroups.com>
                    > > Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?
                    > >
                    > >
                    > >
                    > > TRADE scripter
                    > >
                    > > Thank you for the reply.
                    > > Is it also true that you cannot reassign a value/variable?
                    > > -- you must use a temp/scratch variable
                    > >
                    > > Assigning only once makes my "if" statements deeply nested (4+ levels)
                    > >
                    > > ray
                    > >
                    > > --- In TOS_thinkscript@yahoogroups.com
                    > <mailto:TOS_thinkscript%40yahoogroups.com>
                    > > <mailto:TOS_thinkscript%40yahoogroups.com> , "tradescripter"
                    > > <tradescripter@> wrote:
                    > > >
                    > > > No, there isn't a way to call subroutines or user defined
                    > > studies/strategies in thinkScript. Everything must be self contained.
                    > There
                    > > is also no looping capability in thinkScript.
                    > > > In order to reference a defined variable, the variable you want to
                    > > reference must be above the line you are using to reference the variable.
                    > > > I had the impression that TOS intended to update thinkScript to be able
                    > to
                    > > call user defined studies, but at the present time, I'm not counting on
                    > it.
                    > > I am hoping that somehow we get a more powerful programing language in the
                    > > future.
                    > > > You can call TOS defined studies inside a user defined study, which can
                    > > simplify the code a little.
                    > > >
                    > > > TRADE scripter
                    > > >
                    > > >
                    > > > --- In TOS_thinkscript@yahoogroups.com
                    > <mailto:TOS_thinkscript%40yahoogroups.com>
                    > > <mailto:TOS_thinkscript%40yahoogroups.com> , Raymond Walsh <rnw2000@>
                    > wrote:
                    > > > >
                    > > > > Hello everyone
                    > > > >
                    > > > > Is it possible to create & call subroutines (strategies)?
                    > > > >
                    > > > > Thank you for any pointers or suggestions
                    > > > > ray
                    > > > >
                    > > >
                    > >
                    >
                  • tradescripter
                    See this post for plotting yesterday s high on today s chart. http://finance.groups.yahoo.com/group/TOS_thinkscript/message/663
                    Message 9 of 9 , Apr 2, 2009
                    • 0 Attachment
                      See this post for plotting yesterday's high on today's chart.

                      http://finance.groups.yahoo.com/group/TOS_thinkscript/message/663

                      --- In TOS_thinkscript@yahoogroups.com, "Steve Smegner" <ssmegner@...> wrote:
                      >
                      > My fault. I misspoke. I meant to say study rather than strategy.
                      >
                      >
                      >
                      > I actually have a side question. I noticed that some studies use a 'period =
                      > DAY' type of input. I have found DAY, WEEK, MONTH as valid options. Are
                      > there others? I was looking at pivot points and fully understand why they
                      > use DAY, WEEK, MONTH. But what about default time frame? Is there an option
                      > like 'period = bar'?
                      >
                      >
                      >
                      > Back to the original question, I was trying to create a study around pivot
                      > points and moving averages. For example the previous day will set the pivot
                      > points for the next day. That is why the pivot point studies allow 'period =
                      > DAY'. But when I view the chart intraday I want to add one or more simple
                      > moving averages of the pivot point based on the previous X bars. One example
                      > might be a 5 bar pivot point moving average. SMA(PP,5). I have created this
                      > for Tradestation and Genesis and was hoping to do this in TOS. I have been
                      > using TOS for more than 5 years and would prefer to use TOS for all my
                      > trading rather than using 2 platforms.
                      >
                      >
                      >
                      > With Genesis I created a pivot point function which computes the pivot point
                      > from the previous period which is selectable to be DAY, WEEK, MONTH, BAR.
                      > Genesis (and Tradestation) allows me to feed as input to the SMA function
                      > any other function whether built in or user created. I already have all the
                      > strategies and rules that I like to use around what I am trying to draw on
                      > the chart.
                      >
                      >
                      >
                      > From: TOS_thinkscript@yahoogroups.com
                      > [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of tradescripter
                      > Sent: Thursday, April 02, 2009 12:03 PM
                      > To: TOS_thinkscript@yahoogroups.com
                      > Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?
                      >
                      >
                      >
                      > If the user defined study that you want to use as an input to a strategy
                      > isn't too long, then you can just add the code to the strategy. I do have to
                      > state however, that I don't use the strategies because I find them to
                      > difficult to work with, and not worth the trouble. All a strategy can do is
                      > plot an arrow. Well, I can't plot an arrow in a study, but I can plot a dot,
                      > so that's a minor difference.
                      >
                      > TRADE scripter
                      >
                      > --- In TOS_thinkscript@yahoogroups.com
                      > <mailto:TOS_thinkscript%40yahoogroups.com> , "Steve Smegner" <ssmegner@>
                      > wrote:
                      > >
                      > > This explains a lot. I have been trying to create my own functions and use
                      > > those inside another strategy. More specifically I wanted to plot SMA's of
                      > 2
                      > > user defined functions. Something like plot sma(MYFunc1,5) and plot
                      > > SMA(MyFunc2,7).
                      > >
                      > >
                      > >
                      > > I suppose I will have to go back to Tradestation or Genesis for now.
                      > >
                      > >
                      > >
                      > >
                      > >
                      > > From: TOS_thinkscript@yahoogroups.com
                      > <mailto:TOS_thinkscript%40yahoogroups.com>
                      > > [mailto:TOS_thinkscript@yahoogroups.com
                      > <mailto:TOS_thinkscript%40yahoogroups.com> ] On Behalf Of Ray
                      > > Sent: Thursday, April 02, 2009 5:21 AM
                      > > To: TOS_thinkscript@yahoogroups.com
                      > <mailto:TOS_thinkscript%40yahoogroups.com>
                      > > Subject: [TOS_thinkscript] Re: Call a User Defined strategy ?
                      > >
                      > >
                      > >
                      > > TRADE scripter
                      > >
                      > > Thank you for the reply.
                      > > Is it also true that you cannot reassign a value/variable?
                      > > -- you must use a temp/scratch variable
                      > >
                      > > Assigning only once makes my "if" statements deeply nested (4+ levels)
                      > >
                      > > ray
                      > >
                      > > --- In TOS_thinkscript@yahoogroups.com
                      > <mailto:TOS_thinkscript%40yahoogroups.com>
                      > > <mailto:TOS_thinkscript%40yahoogroups.com> , "tradescripter"
                      > > <tradescripter@> wrote:
                      > > >
                      > > > No, there isn't a way to call subroutines or user defined
                      > > studies/strategies in thinkScript. Everything must be self contained.
                      > There
                      > > is also no looping capability in thinkScript.
                      > > > In order to reference a defined variable, the variable you want to
                      > > reference must be above the line you are using to reference the variable.
                      > > > I had the impression that TOS intended to update thinkScript to be able
                      > to
                      > > call user defined studies, but at the present time, I'm not counting on
                      > it.
                      > > I am hoping that somehow we get a more powerful programing language in the
                      > > future.
                      > > > You can call TOS defined studies inside a user defined study, which can
                      > > simplify the code a little.
                      > > >
                      > > > TRADE scripter
                      > > >
                      > > >
                      > > > --- In TOS_thinkscript@yahoogroups.com
                      > <mailto:TOS_thinkscript%40yahoogroups.com>
                      > > <mailto:TOS_thinkscript%40yahoogroups.com> , Raymond Walsh <rnw2000@>
                      > wrote:
                      > > > >
                      > > > > Hello everyone
                      > > > >
                      > > > > Is it possible to create & call subroutines (strategies)?
                      > > > >
                      > > > > Thank you for any pointers or suggestions
                      > > > > ray
                      > > > >
                      > > >
                      > >
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.