Announcement

Collapse
No announcement yet.

Help with basic code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with basic code

    Hello.
    I would like to get some help for something basic so I can understand the logic of this syntex as a former TradeStation user.

    Id like to code an Alert where the condition is

    IF Current Indicator Value > Indicator Value[1] and Indicator Value[1] < Indicator Value[2] and Indicator Value[2] > Indicator Value[3] then
    Alert (pop up what ever).

    Indicator Value can be either RSI, Stochastic, CCI.

    This would look like a zigzag or 1,2,3 set up.

    Thank you.

  • #2
    mavrik73
    The attached efs should do what you asked using the builtinRSI study.
    The additional vFlag condition is to limit the alerts to only once per bar since this efs computes on every tick.
    Note that the syntax used in this case to retrieve a past value of the indicator (the -1 in vRSI.getValue(RSIStudy.RSI,-1) for the value of the RSI at the prior bar) only works with builtin studies and not with custom variables. With custom variables you need to use arrays.
    Alex
    Attached Files

    Comment


    • #3
      Aditional parts

      Alex.
      Thank you for helping.
      I think we will all appreciate this system soon.

      If you can please.
      Add to this ESF its opposite part (same code but opposite sequence or an invers ZIGZAG if you please).

      Also can you add to the alert a sign on the chart @ the close of the trigger bar (bellow for long and above for short).

      This will help us judge how this workd out in the past.

      (Ill give you all Back Testing parameters if you will want to check this as I dod in TradeStation).


      Thank you for your help.

      Comment


      • #4
        mavrik73
        The attached efs adds the reverse zigzag to the RSI study.
        However, because an efs cannot plot at the same time in an indicator window and in the price pane I have modified the study to draw only the arrows in the price pane.
        The arrows will draw in real time ie. they will appear/disappear intrabar depending if the conditions return true or not.
        If at the completion of a bar the conditions the efs will also trigger a sound alert.
        All parameters for the RSI study can be modified through Edit Studies.
        Alex

        Attached Files

        Comment


        • #5
          Problem with the code

          I added to the code that RSI Value-1 <= (added the = sign) so that have more instances and dont miss set ups.

          This works fine but here is an example where it didnt work.
          Can you check it?

          5 min ES Z4=2
          10:30 to 10:45 EST (1,2,3 bars ).

          look @ the file
          Attached Files

          Comment


          • #6
            I meant Value-1 &lt;= Value-2

            in the post bellow I ment that I added the = sign to the second part where RSI-1 <= RSI-2 so you also get alerted when you have a "flat line" in the midle of the zigzag.

            T^hanks


            Itai

            Comment


            • #7
              Itai
              The arrow is showing on the 10:45 bar after having added the = sign to the conditions.
              You may want to make sure that you added the = sign in all the appropriate places
              Alex

              Comment


              • #8
                I cant make it work please post it

                Can you post it under a new name.
                I cant make it work.

                vRSI.getValue(RSIStudy.RSI,-1)>=vRSI.getValue(RSIStudy.RSI,-2)&&

                Comment


                • #9
                  Itai
                  Attached is the revised version
                  Alex
                  Attached Files

                  Comment


                  • #10
                    Thanks

                    !

                    Comment


                    • #11
                      Help with Code

                      Hello.

                      Please look @ the second part of the code.
                      I want the alert to :
                      A - trigger intrabar (I know this can cause multiple triggering).
                      B - Get the NIce pop up @ the bottom of the screen to appear with the Price and Alert details.

                      This part of the code, was modified by me for the above functionality but with no success.

                      Thanks Itai
                      Attached Files
                      Last edited by mavrik73; 10-18-2004, 06:38 AM.

                      Comment


                      • #12
                        Itai
                        The attached revision should trigger the sound and popup alerts in real time. Note that this will cause multiple triggers.
                        Alex
                        Attached Files

                        Comment


                        • #13
                          Syntax Error

                          Dear Akex.
                          Thank you.
                          I would like the alert window, show the Trigger price and the the STOP ("currentbarlow for longtrigger and currentbarhigh for short trigger).

                          I tryed adding getValue(Close) + getValue(High) between the getsymbol and getinterval which you added to the code you provided bellow. But this generated a SYTEX error. I also tryed to add just close and High instead but also didnt work.

                          Please help.
                          Thanks
                          Itai
                          Attached Files
                          Last edited by mavrik73; 10-18-2004, 10:07 AM.

                          Comment


                          • #14
                            Itai
                            The attached revision includes the current Low and High in the popup alert message.
                            Alex
                            Attached Files

                            Comment


                            • #15
                              controling the distance from High/Low

                              Dear alex.
                              here in the code do I control the distance from the High Low @which Id like the Arrow to plot.

                              Example High + 0.5 or Low -1 ?
                              Currently the arrows might disapear due to aditional indicators.

                              Comment

                              Working...
                              X