Announcement

Collapse
No announcement yet.

capturing a hook

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

  • capturing a hook

    I have little experience with the wizard and am looking for some help. I am trying to print just one red set up bar, where the cci closes hooked down from above 100. I have accomplished that but i assume in a round about way since the conditions I have used can lead to more than one red bar. Are there any suggestions to stop this printing of the second red bar, to just print the hook...end of story.....and move on?

  • #2
    My picture did not show up so I will expalain the best I can. I want to print one bar that represents the cci hooking down from above 100. I have it conditoned so that if LAST bar closes above 100, and the current bar closes below last then paint bar. This captures the hook, yet at times the bar following the painted bar may also meet these conditions, having previously closed above 100 and the current one also closing below the last. Are there any suggestions for just capturing the hook alone?

    Comment


    • #3
      pict.

      pic
      Attached Files

      Comment


      • #4
        barner
        To define the hook as a unique event add another condition in your Set2 to check that the CCI at the prior bar is greater than that of two bars ago (see enclosed image).
        Alex

        Comment


        • #5
          Alexis, thank you very much. The fix works and I understand it. I added the conditions to alert list and to play a sound file 'everytime.' However when a bar is open that is meeting the conditions, every trade while the bar is open triggers an alert and plays the sound file. When I place the alerts in the 'only happen first time,' it creates an alert only the very first time the conditions are met from the beginning of the day and fails to work after. Do you have any ideas for creating one alert when the conditions are met? I assume which will occur at bars close since if still open the conditions could be voided?

          Thanks

          Comment


          • #6
            barner
            To get a single sound alert you need to add a new Set (after your Set2) in which you check for a new bar and for the same conditions you have in Set2 however all offset by an additional bar (see the example provided in the enclosed image).
            The alert will now sound every time a red bar is completed. Because this condition in Set3 can be true only on the first tick of a new bar the alert will be triggered only once.
            Alex

            Comment


            • #7
              Alexis, thank you very much, I followed your suggestions and everything worked as expected. Thanks!

              Comment


              • #8
                barner
                You are most welcome and thank you for the feedback
                Alex

                Comment


                • #9
                  hook as a secondary condition?

                  Attached is an image of where a hook from below -100 on the cci color codes the bar. As set up now it captures only the hook. Is there a way in the wizard to conditon this so that following the hook from -100, all bars are painted until the cci hooks back down regardless of where the cci is. In this example that would be until the second blue lines. And for another series to begin again after closing hooked down the cci must simply close down below -100 and hook up again. Thanks.
                  Attached Files

                  Comment


                  • #10
                    barner
                    It is possible to do that with the Formula Wizard however you will need to write the command to be executed as that is not included in the list of pre-defined actions.
                    First you need to modify your existing Set1 as follows



                    Then you need to add a Set2 with the conditions that will reset the default color (in this example I am assuming that the default bar color is black)



                    The result of these changes is visible in the screenshot enclosed below
                    Alex

                    Comment


                    • #11
                      Thanks Alexis, this is very close to what i am trying do however there is one problem. The series begins correctly, printing when the cci is greater than last starting from below -100. However the last bar of every series that is painted as currenlty written is not good. The cci actually closed down or less than previous yet it painted it still, those last blue bars in those series should be the first black bars. Any suggestions, Thanks!

                      Comment


                      • #12
                        barner
                        If you do not want to color the bar in which the CCI hooks down then just add a setPriceBarColor(Color.RGB(0,0,0)) command to Set2 [this would be in addition to the setDefaultPriceBarColor(...) that should already be in Set2]
                        Alex

                        Comment


                        • #13
                          Thank you very much Alexis, it works although I am little confused about how the change did that.

                          Comment

                          Working...
                          X