Announcement

Collapse
No announcement yet.

Intermittent intrabar meeting of an interbar criteria

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

  • #16
    Thanks Brad

    Brad, no doubt due to my obscure description of the switching criteria, the latest version of your program, posted today at 13:09, has the same quirk as Alex's. In today's previous post, 13:11, I described this quirk and remedied it in Alex's program. But you take a differant approach to the problem, so my fix for Alex's program won't work on yours. Alex's now quirkless program works, so no need to spend more time on yours for my sake. Thanks for your help.

    Mike

    Comment


    • #17
      update...

      here you go... Minor correction to handle RT bars..

      B
      Attached Files
      Brad Matheny
      eSignal Solution Provider since 2000

      Comment


      • #18
        Two questions

        Hi Alex. Two questions.

        First, the study, PV Color, works well expect it doesn't plot the first bar's (06:30) volume. If you put up a one minute chart with the West Coast Equity time template of Friday's e-mini and then add the attached study, you'll notice that no volume is shown for the first bar. Can you suggest a modification that will get the study to show the first bar's volume?

        Second, if I load one day's data into a chart and apply PV Color, the initial bar(s), that is starting at (06:30), are colored the defualt black unit the switch to green or switch to magenta criteria re fulfilled. That is as it should be. But if I load more than one day's data, those initial formerly black bars are clored because they have been compared to the closing bar(s) of the previous day. Is there a way to either modify the program to prevent this, or more simply is there a way to load only one day's data other than the current day? That is, is there a way to load only say last Tuesday's data. That would also solve the proglem. Thanks for your help.

        Mike

        Comment


        • #19
          Two questions ... forgot to attach study

          Here's the study referred to in the last post.

          Mike
          Attached Files

          Comment


          • #20
            Mike
            The volume does not plot on the first bar because the conditions cannot reference prior bars as these do not exist. The solution is to enclose all your current code in a conditional statement that that waits for at least two bars before evaluating any conditions ie.

            PHP Code:
            function main() {
                if(
            getCurrentBarCount() >= 2){ //if the bar count is equal to 2 or more
                    //'your existing code
                
            }else{ //otherwise 
                    
            setBarFgColor(Color.black);//color the volume bar in black
                    
            setBarThickness(5);//set the bar thickness
                
            }
                return 
            volume(0);

            As to your second question it is possible to reset the colors at the beginning of the day. To do that you need to create your own counter which is increased by 1 at every new bar and which gets reset to 0 on the first bar of a new day. Once you have that then you need to rewrite your existing conditions to execute different commands when this counter is equal to 0 (which will be on the first bar of the day) or when it is equal to or greater than 1 ie on all the other bars during that day.
            If you are unable to do this yourself and the script is important to your trading then I would suggest that you contact one of the EFS Consultants and have them develop the study for you
            Alex

            Comment


            • #21
              Thanks

              Thanks Alex. The incredible amount of first class work you do helping others on this board has always astounded me.

              Mike

              Comment

              Working...
              X