Announcement

Collapse
No announcement yet.

strategy and colors

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

  • strategy and colors

    Hi Alex,
    The strategy is buy and sell when the rafter(color).efs change the color.
    One thing more, please, sometimes the rafter.efs pass in the middle of the bars and it is difficult to see it.
    Is it possible to change the colors background when it (rafter) change colors, too?
    Thank you very much for all.

  • #2
    Barros
    You need to either attach the efs or post a link to it as I have worked on several versions of that efs
    Alex

    Comment


    • #3
      The EFS

      rafter(color).efs

      Comment


      • #4
        rafter(color).efs

        /************************************************** *****************
        Provided By : TS Support, LLC for eSignal. (c) Copyright 2002
        ************************************************** ******************/


        function preMain()
        {
        setStudyTitle("Movtrend");
        setCursorLabelName("Movtrend", 0);
        setDefaultBarFgColor(Color.white, 0);
        setPlotType(PLOTTYPE_INSTANTCOLORLINE);
        setDefaultBarThickness(2, 0);
        setPriceStudy(true);

        }

        var wt = null;
        var wt_1 = null;

        function main(n) {

        if(n == null)
        n = 34;
        var sum = 0;
        var i = 0;

        if(getBarState()==BARSTATE_NEWBAR){
        wt_1 = wt;
        }

        for(i = n; i > 0; i--)
        sum += (i - (n + 1) / 3) * close(i - n);
        wt = 6 / (n * (n + 1)) * sum;

        if(wt>wt_1)
        setBarFgColor(Color.blue);
        if(wt<wt_1)
        setBarFgColor(Color.red);


        return wt;
        }

        Comment


        • #5
          Barros
          The attached revision will paint the background when the indicator changes color
          Alex

          Attached Files

          Comment


          • #6
            Thank You Alex

            Thank you very much , Alex

            Comment

            Working...
            X