in Search

Help Req- MINDAS Intra day formula

Last post 11-23-2012, 1:41 by wabbit. 1 replies.
Sort Posts: Previous Next
  •  11-22-2012, 23:22 40045

    Help Req- MINDAS Intra day formula

    Hi all,

    Below is the MIDAS formula for intra day S/R bands. Its been given in the book "MIDAS technical analysis".

    I am trying to copy the formula in metastock 11 but its showing error can some body please help to correctly put it in metastock formula.

    sm:= Input("starting month",1,12,1);
    sd:= Input("starting day of month",1,31,1);
    sy:= Input("starting year",1980,2100,2000);
    sh:=Input("hour", 1,24,1);
    se:=Input("minute",0,60,0);
    start:= sd=DayOfMonth() AND sm=Month() AND sy=Year() AND sh=Hour() AND se=Minute();
    x:=Input("Price Field,1=O,2=H,3=L,4 =C,5= MP ()",1,5,4 );
    y:=If( x =l,O,If(x=2,H,If(x=3,L,If(x=4,C,
    If(x=5,MP(),0)))));
    ab:=y*V;
    denom:=If(Cum(V)-ValueWhen(1,start,Cum(V))=0,l,Cum(V)-
    ValueWhen(l,start,Cum(V)));

    If(BarsSince (start),(Cum(ab)-ValueWhen(1,start,Cum(ab)))/denom,MP())

    here i am facing the problem:
    ValueWhen(l,start,Cum(V)));

    "the variable of expression must contain only constant data"

    kindly help.





  •  11-23-2012, 1:41 40047 in reply to 40045

    Re: Help Req- MINDAS Intra day formula

    Change the lower case 'L' in the ValueWhen() expression to '1' (one)


    wabbit Big Smile [:D]



    Please update your thread status:

    FREE Equis Formula Primer : http://forum.equis.com/files/19673/download.aspx
    To post code, *code* your code */code*
    To post links, [URL] URL goes here [/URL]
    For custom MetaStock and DLL programming : http://www.wabbit.com.au
    Contact via SkyPE
View as RSS news feed in XML