in Search

Pls help on generating an horizontal line

Last post 12-23-2006, 14:22 by happysingh. 4 replies.
Sort Posts: Previous Next
  •  12-16-2006, 10:22 22113

    Pls help on generating an horizontal line

    hi,

    i have created an indicator and it calculates value on previous day basis. single day previous.

    now i know what value comes out. but it being one single point is shown as dot on chart.

    is that possible that instead of dot, i can get a horizontal line in its place automatically.

    pls guide....

    waiting for reply.

    Navneet Singhal

    www.navneetsinghal.blogspot.com

    email: coolguynavneet@gmail.com

     


    Thanks & Regards
    Navneet Singhal
    Delhi, India

    E-Mail: navneet.singhal001@gmail.com

    www.navneetsinghal.blogspot.com
  •  12-19-2006, 11:18 22168 in reply to 22113

    no answer by any one ??????????

    was that a very high thing i demanded from metastock software............ no body answered............. pls answer is it possible or not......... thanks
    Thanks & Regards
    Navneet Singhal
    Delhi, India

    E-Mail: navneet.singhal001@gmail.com

    www.navneetsinghal.blogspot.com
  •  12-19-2006, 13:22 22171 in reply to 22168

    Re: no answer by any one ??????????

    If you include the code I can try and see what is happening.  Alternately you can email formulas@equis.com for debugging assistance.
  •  12-19-2006, 13:44 22173 in reply to 22168

    Re: no answer by any one ??????????

    Navneet

     

     

    It is not difficult to do what you ask. The procedure is as follows.

     

    Mark the bar on which the wanted value is plotted.

    Use ValueWhen() to plot that value.

    Use LastValue() to extend the line across all bars on the chart.

     

    There are several ways in which the basic procedure can be applied and I’ll leave it to you to sort out what works best. The second to last bar van be marked like so.

     

    B:=LastValue(Cum(1))-1=Cum(1);

     

    Let’s assume your signal for this example is a 10-period SMA.

     

    M:=Mov(C,10,S);

     

    So the value of the moving average on the second to last bar can be plotted with -

     

    X:=ValueWhen(1,B,M);

     

    And that line can be extended with LastValue(). The completed formula might look like this below.

     

    B:=LastValue(Cum(1))-1=Cum(1);

    M:=Mov(C,10,S);

    X:=ValueWhen(1,B,M);

    LastValue(X);

     

     

    Roy

    MetaStock Tips & Tools

  •  12-23-2006, 14:22 22237 in reply to 22173

    Re: no answer by any one ??????????

    Thank You Mr. Roy. It was wondeful use of these fuctions. I have made my formula with the help of u r exapmle. Thanks a lot.
    Thanks & Regards
    Navneet Singhal
    Delhi, India

    E-Mail: navneet.singhal001@gmail.com

    www.navneetsinghal.blogspot.com
View as RSS news feed in XML