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

MAcrossover in TOS Magazine

Expand Messages
  • David McHugh
    I started with the example in this month TOS magazine, and have been trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200) to split out long
    Message 1 of 15 , Feb 3, 2008
    • 0 Attachment
      I started with the example in this month TOS magazine, and have been
      trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
      to split out long versus short trades...unfortunitly it tags every
      candle after the cross over. I've tried to:
      DEF Today$=1,(High+low+close)/3);
      DEF Tie=Today$=fourday;
      DEF Cross_Over=Tie>Tie[1];

      But 'No JOY'... Does anyone have a list of commands, actions, symbols
      etc.....what does && do?
    • Newbie Novice
      I use trade station and it has built-in ma crossovers. You plug in the input (4,9) and it will do the alert for you! David McHugh wrote:
      Message 2 of 15 , Feb 3, 2008
      • 0 Attachment
        I use trade station and it has built-in ma crossovers. You plug in the input (4,9) and it will do the alert for you!

        David McHugh <dvd_mchugh@...> wrote:
        I started with the example in this month TOS magazine, and have been
        trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
        to split out long versus short trades...unfortunit ly it tags every
        candle after the cross over. I've tried to:
        DEF Today$=1,(High+ low+close) /3);
        DEF Tie=Today$=fourday;
        DEF Cross_Over=Tie> Tie[1];

        But 'No JOY'... Does anyone have a list of commands, actions, symbols
        etc.....what does && do?



        Never miss a thing. Make Yahoo your homepage.

      • Darryl Wagoner
        Hi, Is the TOS Magazine on line or does it come in the mail? Can you send me the code? && is a logical and. If a is true AND(&&) b is true then do something.
        Message 3 of 15 , Feb 4, 2008
        • 0 Attachment
          Hi,

          Is the TOS Magazine on line or does it come in the mail?
          Can you send me the code?

          && is a logical and. If a is true AND(&&) b is true then do something.

          -darryl

          On Feb 3, 2008 3:26 PM, David McHugh <dvd_mchugh@...> wrote:
          >
          > I started with the example in this month TOS magazine, and have been
          > trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
          > to split out long versus short trades...unfortunitly it tags every
          > candle after the cross over. I've tried to:
          > DEF Today$=1,(High+low+close)/3);
          > DEF Tie=Today$=fourday;
          > DEF Cross_Over=Tie>Tie[1];
          >
          > But 'No JOY'... Does anyone have a list of commands, actions, symbols
          > etc.....what does && do?
          >
          >



          --
          Darryl Wagoner - WA1GON

          "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]
        • Darryl Wagoner
          Noshee, That is all well and good, except this group is for the Think or Swim(TOS) Platform. Tradestation(TS) has very good software (but TOS) is catching up
          Message 4 of 15 , Feb 4, 2008
          • 0 Attachment
            Noshee,

            That is all well and good, except this group is for the Think or
            Swim(TOS) Platform.

            Tradestation(TS) has very good software (but TOS) is catching up fast and for
            options it is far better than anything other brokers have including TS.

            TS has a very high price tag if you are not a broker customer and TS as a
            broker sucks! They have so many made up rules that they are unusable
            as a broker.

            You are welcome to stay in the group, but please keep in mind that this
            group is for TOS thinkscript not EL.

            -darryl

            On Feb 3, 2008 6:59 PM, Newbie Novice <newbienovice@...> wrote:
            >
            > I use trade station and it has built-in ma crossovers. You plug in the input
            > (4,9) and it will do the alert for you!
            >
            >

            --
            Darryl Wagoner - WA1GON

            "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]
          • Newbie Novice
            What do you mean by You are welcome to stay in the group ?. Did I say something which prompted you to say that? Do you want me to leave the group? I mentioned
            Message 5 of 15 , Feb 4, 2008
            • 0 Attachment
              What do you mean by "You are welcome to stay in the group"?. Did I say something which prompted you to say that? Do you want me to leave the group?
               
              I mentioned what I see in Trade Station. I know all the pros and cons of Trade Station so no need to tell me.
               
              Noshee

              Darryl Wagoner <darryl.wagoner@...> wrote:
              Noshee,

              That is all well and good, except this group is for the Think or
              Swim(TOS) Platform.

              Tradestation( TS) has very good software (but TOS) is catching up fast and for
              options it is far better than anything other brokers have including TS.

              TS has a very high price tag if you are not a broker customer and TS as a
              broker sucks! They have so many made up rules that they are unusable
              as a broker.

              You are welcome to stay in the group, but please keep in mind that this
              group is for TOS thinkscript not EL.

              -darryl

              On Feb 3, 2008 6:59 PM, Newbie Novice <newbienovice@ yahoo.com> wrote:
              >
              > I use trade station and it has built-in ma crossovers. You plug in the input
              > (4,9) and it will do the alert for you!
              >
              >

              --
              Darryl Wagoner - WA1GON

              "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]


              Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

            • Darryl Wagoner
              ... What prompted it is the focus of this group is TOS ThinkScript, not TS or EL. What TS, Worden Blocks, ESignals, etc does comments aren t helpful in solving
              Message 6 of 15 , Feb 4, 2008
              • 0 Attachment
                On Feb 4, 2008 11:56 AM, Newbie Novice <newbienovice@...> wrote:
                >
                > What do you mean by "You are welcome to stay in the group"?. Did I say
                > something which prompted you to say that? Do you want me to leave the group?

                What prompted it is the focus of this group is TOS ThinkScript, not TS or EL.
                What TS, Worden Blocks, ESignals, etc does comments aren't helpful in
                solving a coding problem with ThinkScript unless it was a code snippet.

                I just want to keep the group on track.

                thanks
                -darryl

                >
                > I mentioned what I see in Trade Station. I know all the pros and cons of
                > Trade Station so no need to tell me.
                >
                > Noshee
                >
                >
                >
                > Darryl Wagoner <darryl.wagoner@...> wrote:
                >
                >
                >
                >
                > Noshee,
                >
                > That is all well and good, except this group is for the Think or
                > Swim(TOS) Platform.
                >
                > Tradestation(TS) has very good software (but TOS) is catching up fast and
                > for
                > options it is far better than anything other brokers have including TS.
                >
                > TS has a very high price tag if you are not a broker customer and TS as a
                > broker sucks! They have so many made up rules that they are unusable
                > as a broker.
                >
                > You are welcome to stay in the group, but please keep in mind that this
                > group is for TOS thinkscript not EL.
                >
                > -darryl
                >
                > On Feb 3, 2008 6:59 PM, Newbie Novice <newbienovice@...> wrote:
                > >
                > > I use trade station and it has built-in ma crossovers. You plug in the
                > input
                > > (4,9) and it will do the alert for you!
                > >
                > >
                >
                > --
                > Darryl Wagoner - WA1GON
                >
                > "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]
                >
                >
                >
                > ________________________________
                > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
                > now.



                --
                Darryl Wagoner - WA1GON

                "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]
              • Newbie Novice
                Ok! Understood! ... What prompted it is the focus of this group is TOS ThinkScript, not TS or EL. What TS, Worden Blocks, ESignals, etc does comments aren t
                Message 7 of 15 , Feb 4, 2008
                • 0 Attachment
                  Ok! Understood!

                  Darryl Wagoner <darryl.wagoner@...> wrote:
                  On Feb 4, 2008 11:56 AM, Newbie Novice <newbienovice@ yahoo.com> wrote:
                  >
                  > What do you mean by "You are welcome to stay in the group"?. Did I say
                  > something which prompted you to say that? Do you want me to leave the group?

                  What prompted it is the focus of this group is TOS ThinkScript, not TS or EL.
                  What TS, Worden Blocks, ESignals, etc does comments aren't helpful in
                  solving a coding problem with ThinkScript unless it was a code snippet.

                  I just want to keep the group on track.

                  thanks
                  -darryl

                  >
                  > I mentioned what I see in Trade Station. I know all the pros and cons of
                  > Trade Station so no need to tell me.
                  >
                  > Noshee
                  >
                  >
                  >
                  > Darryl Wagoner <darryl.wagoner@ gmail.com> wrote:
                  >
                  >
                  >
                  >
                  > Noshee,
                  >
                  > That is all well and good, except this group is for the Think or
                  > Swim(TOS) Platform.
                  >
                  > Tradestation( TS) has very good software (but TOS) is catching up fast and
                  > for
                  > options it is far better than anything other brokers have including TS.
                  >
                  > TS has a very high price tag if you are not a broker customer and TS as a
                  > broker sucks! They have so many made up rules that they are unusable
                  > as a broker.
                  >
                  > You are welcome to stay in the group, but please keep in mind that this
                  > group is for TOS thinkscript not EL.
                  >
                  > -darryl
                  >
                  > On Feb 3, 2008 6:59 PM, Newbie Novice <newbienovice@ yahoo.com> wrote:
                  > >
                  > > I use trade station and it has built-in ma crossovers. You plug in the
                  > input
                  > > (4,9) and it will do the alert for you!
                  > >
                  > >
                  >
                  > --
                  > Darryl Wagoner - WA1GON
                  >
                  > "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]
                  >
                  >
                  >
                  > ____________ _________ _________ __
                  > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
                  > now.

                  --
                  Darryl Wagoner - WA1GON

                  "Evil triumphs when good men do nothing." - Edmund Burke [1729-1797]


                  Never miss a thing. Make Yahoo your homepage.

                • Option Income Trader
                  Hi David, what are you actually trying to code? Which is your entry/exit criteria in plain english? Go Long when MA(200) crosses above all other MAs (4,9,and
                  Message 8 of 15 , Feb 4, 2008
                  • 0 Attachment
                    Hi David, what are you actually trying to code?  Which is your entry/exit criteria in plain english?

                    Go Long when MA(200) crosses above all other MAs (4,9,and 18)
                    Go Short when MA(200) crosses below all other MAs(4,9 and 18)

                    Using the sample code from the magazine, this would be the code to go LONG (you'll need to create also the reverse to go EXIT or go SHORT):

                    declare LONG_ENTRY;
                    DEF FourDay = reference SimpleMovingAvg(length = 4);
                    DEF NineDay = reference SimpleMovingAvg(length = 9);
                    DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                    DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                    addOrder(TwoHundredDay > EightTeenDay && TwoHundredDay > NineDay && TwoHundredDay > FourDay);


                    Unfortunately I couldn't find too much information available, only the page that comes up as help (http://www.thinkorswim.com/tos/thinkScriptHelp.jsp?laf=dark)
                    The language is not very friendly, but I think it's flexible enough to code anything you want.

                    Regards,
                    JG.

                    David McHugh said the following on 2/3/2008 3:26 PM:

                    I started with the example in this month TOS magazine, and have been
                    trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
                    to split out long versus short trades...unfortunit ly it tags every
                    candle after the cross over. I've tried to:
                    DEF Today$=1,(High+ low+close) /3);
                    DEF Tie=Today$=fourday;
                    DEF Cross_Over=Tie> Tie[1];

                    But 'No JOY'... Does anyone have a list of commands, actions, symbols
                    etc.....what does && do?


                  • david mchugh
                    HI JG Thanks for the input...its nice to find somebody interested :) I am trying to develop a scripts to run against index(s).... Go LONG when MA 4 crosses
                    Message 9 of 15 , Feb 5, 2008
                    • 0 Attachment
                      HI JG   Thanks for the input...its nice to find somebody interested :)

                      I am trying to develop a scripts to run against index(s)....
                      Go LONG when MA 4 crosses above MA9 and MA9>MA18>MA200; and inertia>50.....EXIT when MA4 crosses under MA18 (or inertia parameter?)
                      Go SHORT when MA4 crosses Under MA18 and MA18<MA200; and inertia<50......EXIT when MA4 crosses above MA9 (or inertia parameter?)

                      I'll look at the help page too.....Thanks for your time....enjoy your day..dave

                      Option Income Trader <optionincometrader@...> wrote:
                      Hi David, what are you actually trying to code?  Which is your entry/exit criteria in plain english?

                      Go Long when MA(200) crosses above all other MAs (4,9,and 18)
                      Go Short when MA(200) crosses below all other MAs(4,9 and 18)

                      Using the sample code from the magazine, this would be the code to go LONG (you'll need to create also the reverse to go EXIT or go SHORT):

                      declare LONG_ENTRY;
                      DEF FourDay = reference SimpleMovingAvg( length = 4);
                      DEF NineDay = reference SimpleMovingAvg( length = 9);
                      DEF EightTeenDay = reference SimpleMovingAvg( length = 18);
                      DEF TwoHundredDay = reference SimpleMovingAvg( length = 200);
                      addOrder(TwoHundred Day > EightTeenDay && TwoHundredDay > NineDay && TwoHundredDay > FourDay);


                      Unfortunately I couldn't find too much information available, only the page that comes up as help (http://www.thinkors wim.com/tos/ thinkScriptHelp. jsp?laf=dark)
                      The language is not very friendly, but I think it's flexible enough to code anything you want.

                      Regards,
                      JG.

                      David McHugh said the following on 2/3/2008 3:26 PM:
                      I started with the example in this month TOS magazine, and have been
                      trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
                      to split out long versus short trades...unfortunit ly it tags every
                      candle after the cross over. I've tried to:
                      DEF Today$=1,(High+ low+close) /3);
                      DEF Tie=Today$=fourday;
                      DEF Cross_Over=Tie> Tie[1];

                      But 'No JOY'... Does anyone have a list of commands, actions, symbols
                      etc.....what does && do?




                      Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

                    • Steve Lyon
                      Hi all, I m a TOS user but not aware of the TOS Magazine. Can you direct me? Thanks, Steve
                      Message 10 of 15 , Feb 5, 2008
                      • 0 Attachment
                        Hi all,

                        I'm a TOS user but not aware of the TOS Magazine. Can you direct me?

                        Thanks,

                        Steve
                      • Stephen Lasday
                        Call TOS. Should come in the mail quarterly. Its free _____ From: TOS_thinkscript@yahoogroups.com [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of Steve
                        Message 11 of 15 , Feb 5, 2008
                        • 0 Attachment

                          Call TOS.  Should come in the mail quarterly.  Its free

                           


                          From: TOS_thinkscript@yahoogroups.com [mailto:TOS_thinkscript@yahoogroups.com] On Behalf Of Steve Lyon
                          Sent: Tuesday, February 05, 2008 10:28 AM
                          To: TOS_thinkscript@yahoogroups.com
                          Subject: Re: [TOS_thinkscript] MAcrossover in TOS Magazine

                           

                          Hi all,

                          I'm a TOS user but not aware of the TOS Magazine. Can you direct me?

                          Thanks,

                          Steve

                        • chadkur
                          ... Go to: http://www.thinkorswim.com/tos/displayPage.tos?webpage=thinkMoney Chad K
                          Message 12 of 15 , Feb 5, 2008
                          • 0 Attachment
                            --- In TOS_thinkscript@yahoogroups.com, Steve Lyon <salyon@...> wrote:

                            > I'm a TOS user but not aware of the TOS Magazine. Can you direct me?

                            Go to:
                            http://www.thinkorswim.com/tos/displayPage.tos?webpage=thinkMoney

                            Chad K
                          • Option Income Trader
                            I ve been looking around to the sample strategies, and this is looking interesting (I used to do a lot of programming for Medved Quotetracker charting....the
                            Message 13 of 15 , Feb 5, 2008
                            • 0 Attachment
                              I've been looking around to the sample strategies, and this is looking interesting (I used to do a lot of programming for Medved Quotetracker charting....the good old days).

                              You have to create a different strategy for each action you want to take.
                              Eg: Create a "MA_Xover_LE strategy" (I use "LE" for "LONG_ENTRY"):

                              declare LONG_ENTRY;
                              DEF FourDay = reference SimpleMovingAvg(length = 4);
                              DEF NineDay = reference SimpleMovingAvg(length = 9);
                              DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                              DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                              DEF InertiaVal = reference Inertia( length = 10);
                              def crossover = FourDay > NineDay and FourDay[1] < NineDay[-1];
                              addOrder(crossover and NineDay > EightTeenDay and EightTeenDay > TwoHundredDay and InertiaVal > 50);

                              Then you can create a "MA_Xover_LX" strategy ("LX" for "LONG_EXIT"):

                              declare LONG_EXIT;
                              DEF FourDay = reference SimpleMovingAvg(length = 4);
                              DEF NineDay = reference SimpleMovingAvg(length = 9);
                              DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                              DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                              DEF InertiaVal = reference Inertia( length = 10);
                              def crossover = FourDay < EightTeenDay and FourDay[1] > EightTeenDay[-1];
                              addOrder(crossover or InertiaVal < 50);

                              Then you have to apply both strategies to the chart, and you should see entry/exit signals.

                              If you also want to "short", again you have to create a Short entry and Short exit strategy, using:
                              declare SHORT_ENTRY;
                              declare SHORT_EXIT;

                              The code is all hardcoded, but you can use "input" to enter values for each Moving Average...play around with it, and check the samples, they are not too difficult.
                              Let me know if that is your idea, we can work on getting it better.

                              Enjoy,
                              JG.

                              david mchugh said the following on 2/5/2008 10:11 AM:

                              HI JG   Thanks for the input...its nice to find somebody interested :)

                              I am trying to develop a scripts to run against index(s)....
                              Go LONG when MA 4 crosses above MA9 and MA9>MA18>MA200; and inertia>50.....EXIT when MA4 crosses under MA18 (or inertia parameter?)
                              Go SHORT when MA4 crosses Under MA18 and MA18<MA200; and inertia<50......EXIT when MA4 crosses above MA9 (or inertia parameter?)

                              I'll look at the help page too.....Thanks for your time....enjoy your day..dave

                              Option Income Trader <optionincometrader@ gmail.com> wrote:

                              Hi David, what are you actually trying to code?  Which is your entry/exit criteria in plain english?

                              Go Long when MA(200) crosses above all other MAs (4,9,and 18)
                              Go Short when MA(200) crosses below all other MAs(4,9 and 18)

                              Using the sample code from the magazine, this would be the code to go LONG (you'll need to create also the reverse to go EXIT or go SHORT):

                              declare LONG_ENTRY;
                              DEF FourDay = reference SimpleMovingAvg( length = 4);
                              DEF NineDay = reference SimpleMovingAvg( length = 9);
                              DEF EightTeenDay = reference SimpleMovingAvg( length = 18);
                              DEF TwoHundredDay = reference SimpleMovingAvg( length = 200);
                              addOrder(TwoHundred Day > EightTeenDay && TwoHundredDay > NineDay && TwoHundredDay > FourDay);


                              Unfortunately I couldn't find too much information available, only the page that comes up as help (http://www.thinkors wim.com/tos/ thinkScriptHelp. jsp?laf=dark)
                              The language is not very friendly, but I think it's flexible enough to code anything you want.

                              Regards,
                              JG.

                              David McHugh said the following on 2/3/2008 3:26 PM:
                              I started with the example in this month TOS magazine, and have been
                              trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
                              to split out long versus short trades...unfortunit ly it tags every
                              candle after the cross over. I've tried to:
                              DEF Today$=1,(High+ low+close) /3);
                              DEF Tie=Today$=fourday;
                              DEF Cross_Over=Tie> Tie[1];

                              But 'No JOY'... Does anyone have a list of commands, actions, symbols
                              etc.....what does && do?




                              Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

                            • Mojo
                              Cool! Thanks for including the code. This helps alot. Can you actually use thinkscript to place orders? Mojo Option Income Trader
                              Message 14 of 15 , Feb 5, 2008
                              • 0 Attachment
                                Cool!  Thanks for including the code.  This helps alot.

                                Can you actually use thinkscript to place orders?

                                Mojo

                                Option Income Trader <optionincometrader@...> wrote:
                                I've been looking around to the sample strategies, and this is looking interesting (I used to do a lot of programming for Medved Quotetracker charting....the good old days).

                                You have to create a different strategy for each action you want to take.
                                Eg: Create a "MA_Xover_LE strategy" (I use "LE" for "LONG_ENTRY"):

                                declare LONG_ENTRY;
                                DEF FourDay = reference SimpleMovingAvg(length = 4);
                                DEF NineDay = reference SimpleMovingAvg(length = 9);
                                DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                                DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                                DEF InertiaVal = reference Inertia( length = 10);
                                def crossover = FourDay > NineDay and FourDay[1] < NineDay[-1];
                                addOrder(crossover and NineDay > EightTeenDay and EightTeenDay > TwoHundredDay and InertiaVal > 50);

                                Then you can create a "MA_Xover_LX" strategy ("LX" for "LONG_EXIT"):

                                declare LONG_EXIT;
                                DEF FourDay = reference SimpleMovingAvg(length = 4);
                                DEF NineDay = reference SimpleMovingAvg(length = 9);
                                DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                                DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                                DEF InertiaVal = reference Inertia( length = 10);
                                def crossover = FourDay < EightTeenDay and FourDay[1] > EightTeenDay[-1];
                                addOrder(crossover or InertiaVal < 50);

                                Then you have to apply both strategies to the chart, and you should see entry/exit signals.

                                If you also want to "short", again you have to create a Short entry and Short exit strategy, using:
                                declare SHORT_ENTRY;
                                declare SHORT_EXIT;

                                The code is all hardcoded, but you can use "input" to enter values for each Moving Average...play around with it, and check the samples, they are not too difficult.
                                Let me know if that is your idea, we can work on getting it better.

                                Enjoy,
                                JG.

                                david mchugh said the following on 2/5/2008 10:11 AM:
                                HI JG   Thanks for the input...its nice to find somebody interested :)

                                I am trying to develop a scripts to run against index(s)....
                                Go LONG when MA 4 crosses above MA9 and MA9>MA18>MA200; and inertia>50.....EXIT when MA4 crosses under MA18 (or inertia parameter?)
                                Go SHORT when MA4 crosses Under MA18 and MA18<MA200; and inertia<50......EXIT when MA4 crosses above MA9 (or inertia parameter?)

                                I'll look at the help page too.....Thanks for your time....enjoy your day..dave

                                Option Income Trader <optionincometrader@ gmail.com> wrote:
                                Hi David, what are you actually trying to code?  Which is your entry/exit criteria in plain english?

                                Go Long when MA(200) crosses above all other MAs (4,9,and 18)
                                Go Short when MA(200) crosses below all other MAs(4,9 and 18)

                                Using the sample code from the magazine, this would be the code to go LONG (you'll need to create also the reverse to go EXIT or go SHORT):

                                declare LONG_ENTRY;
                                DEF FourDay = reference SimpleMovingAvg( length = 4);
                                DEF NineDay = reference SimpleMovingAvg( length = 9);
                                DEF EightTeenDay = reference SimpleMovingAvg( length = 18);
                                DEF TwoHundredDay = reference SimpleMovingAvg( length = 200);
                                addOrder(TwoHundred Day > EightTeenDay && TwoHundredDay > NineDay && TwoHundredDay > FourDay);


                                Unfortunately I couldn't find too much information available, only the page that comes up as help (http://www.thinkors wim.com/tos/ thinkScriptHelp. jsp?laf=dark)
                                The language is not very friendly, but I think it's flexible enough to code anything you want.

                                Regards,
                                JG.

                                David McHugh said the following on 2/3/2008 3:26 PM:
                                I started with the example in this month TOS magazine, and have been
                                trying to create a strategy using 3 MAs (4,9,18), with a 4th MA (200)
                                to split out long versus short trades...unfortunit ly it tags every
                                candle after the cross over. I've tried to:
                                DEF Today$=1,(High+ low+close) /3);
                                DEF Tie=Today$=fourday;
                                DEF Cross_Over=Tie> Tie[1];

                                But 'No JOY'... Does anyone have a list of commands, actions, symbols
                                etc.....what does && do?




                                Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.




                                You can find my online trading journal at http://www.insanemoney.com .
                              • Sunny Wang
                                Hi I am a beginner and just start learning using thinkscript. Have a question on check the crossover in the code. why it is: def crossover = FourDay NineDay
                                Message 15 of 15 , Oct 13, 2008
                                • 0 Attachment
                                  Hi

                                  I am a beginner and just start learning using thinkscript. Have a
                                  question on check the crossover in the code.

                                  why it is:
                                  def crossover = FourDay > NineDay and FourDay[1] < NineDay[-1];

                                  not:
                                  def crossover = FourDay > NineDay and FourDay[1] < NineDay[1];

                                  A crossover is defined as fourday > nineday today, and less yesterday,
                                  isn't it? Just don't understand why use four yesterday value compare
                                  to nineday next day value.

                                  Please advice and thanks a lot.

                                  --- In TOS_thinkscript@yahoogroups.com, Mojo <is11mlo@...> wrote:
                                  >
                                  > Cool! Thanks for including the code. This helps alot.
                                  >
                                  > Can you actually use thinkscript to place orders?
                                  >
                                  > Mojo
                                  >
                                  > Option Income Trader <optionincometrader@...> wrote:
                                  I've been looking around to the sample strategies, and this is looking
                                  interesting (I used to do a lot of programming for Medved Quotetracker
                                  charting....the good old days).
                                  >
                                  > You have to create a different strategy for each action you want to
                                  take.
                                  > Eg: Create a "MA_Xover_LE strategy" (I use "LE" for "LONG_ENTRY"):
                                  >
                                  > declare LONG_ENTRY;
                                  > DEF FourDay = reference SimpleMovingAvg(length = 4);
                                  > DEF NineDay = reference SimpleMovingAvg(length = 9);
                                  > DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                                  > DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                                  > DEF InertiaVal = reference Inertia( length = 10);
                                  > def crossover = FourDay > NineDay and FourDay[1] < NineDay[-1];
                                  > addOrder(crossover and NineDay > EightTeenDay and EightTeenDay >
                                  TwoHundredDay and InertiaVal > 50);
                                  >
                                  > Then you can create a "MA_Xover_LX" strategy ("LX" for "LONG_EXIT"):
                                  >
                                  > declare LONG_EXIT;
                                  > DEF FourDay = reference SimpleMovingAvg(length = 4);
                                  > DEF NineDay = reference SimpleMovingAvg(length = 9);
                                  > DEF EightTeenDay = reference SimpleMovingAvg(length = 18);
                                  > DEF TwoHundredDay = reference SimpleMovingAvg(length = 200);
                                  > DEF InertiaVal = reference Inertia( length = 10);
                                  > def crossover = FourDay < EightTeenDay and FourDay[1] >
                                  EightTeenDay[-1];
                                  > addOrder(crossover or InertiaVal < 50);
                                  >
                                  > Then you have to apply both strategies to the chart, and you should
                                  see entry/exit signals.
                                  >
                                  > If you also want to "short", again you have to create a Short entry
                                  and Short exit strategy, using:
                                  > declare SHORT_ENTRY;
                                  > declare SHORT_EXIT;
                                  >
                                  > The code is all hardcoded, but you can use "input" to enter values
                                  for each Moving Average...play around with it, and check the samples,
                                  they are not too difficult.
                                  > Let me know if that is your idea, we can work on getting it better.
                                  >
                                  > Enjoy,
                                  > JG.
                                Your message has been successfully submitted and would be delivered to recipients shortly.