Announcement

Collapse
No announcement yet.

Time Plots on Chart

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

  • Time Plots on Chart

    I would like to have a study that changes the background color of my chart during lunch hours. I use a black chart background and would like the chart to change to say grey or even diff colors from say 11:30 est to 1:30 est. This would mark lunch hours and help to prevent me from trading. Or maybe just 2 lines at the beginning and end if that's possible.

    Thanks,
    Duke

  • #2
    This should be a good start, just change the times and colors
    Attached Files

    Comment


    • #3
      another variation...
      Attached Files

      Comment


      • #4
        Dave , I have also been looking out for something like this but my variation is I want to mask the overnight session so I focus only on daytime info . I was able to do that but I was not able to figure out how to maintain the colours in my candlessticks . When I comment out 'setPriceBarColor(Color.green)' my candle colours all go white .

        Here is what I have (my times are GMT) .

        function preMain(){
        setColorPriceBars(true);
        setPriceStudy(true);
        setStudyTitle("N'emD'em");
        }

        function main(sTime, eTime, line1time, line2time){

        if(sTime==null){sTime=1430;}
        if(line1time==null){line1time=1700;}
        if(line2time==null){line2time=1830;}
        if(eTime==null){eTime=2115;}

        //setPriceBarColor(Color.green);

        BarHr = getHour();
        BarMin = getMinute();
        cBarTimeInt =BarHr*100+BarMin*1;

        if(cBarTimeInt>=sTime && cBarTimeInt<=eTime){setBarBgColor( Color.green );}

        if(cBarTimeInt==line1time){setBarBgColor( Color.white );}

        if(cBarTimeInt==line2time){setBarBgColor( Color.white );}

        return null;
        }

        BTW - I saw on enthios board you were going to take a stab at Handy Chart .. Any progress ? I was also going to do that in a week or so .

        Comment


        • #5
          I am not sure what you are saying. Are you saying there is another efs study controlling the color bars and this one making the bars turn white?

          If so, you might need to 'merge' the two efs so the functionality of this efs doesnt conflict with the other.

          I am still working on the Handy layout, all of the issues are not resolved yet, but I am close.

          Comment


          • #6
            I have no other EFS on the chart that is modifying the bar colours . Before I add the EFS my bars are normal candles with green for bullish candles and red for bearish candles . When I add this EFS the candles all go white if l remove setPriceBarColor(Color.green); When I put it back in all my candles go green with the background and the wicks of the candles vanish except where that background is not green .

            Comment


            • #7
              Well, how about that,

              Try removing that efs and adding this one

              Seems to have corrected itself here.
              Attached Files

              Comment


              • #8
                here is what I show, pic attacged this time
                Attached Files

                Comment


                • #9
                  It worked ! Thanks Dave !!!

                  Comment


                  • #10
                    BillMiniMe

                    You sound surprised

                    PS - Some times I mistake happy for surprised.

                    Comment


                    • #11
                      With Build 566, there are two new EFS functions for controlling the entire chart background

                      setDefaultChartBG(color); // this goes in preMain

                      setChartBG(color); // this goes in main

                      m.
                      Matt Gundersen

                      Comment


                      • #12
                        here is an exaple of Matt's suggestion
                        Attached Files

                        Comment


                        • #13
                          DLoomis,
                          Thanks a lot! I really appreciate all your help. That's like the 3rd one you did for me, I really appreciate it. I got one more request,, I want a EFS strategy that will fully automate trade the SP eminis making 15 + points per day. I want to turn my computer on and come back in a few weeks from vacation with a few extra 100k in my account. PS I'll pay big $$ for this.... lol

                          Comment

                          Working...
                          X