If i put the code in a new pane it will plot a linechart. Is there any way to get th hich, low and Open values and plot candles or barcharts?
--- In [email protected], "carlacash26" <[EMAIL PROTECTED]> wrote: > > Waleed, I'm trying to do the same thing with weighted index. > > Try this code, and maybe you can find what is the error, this code > produces some graph.(Change to you own stocks) > > > weight = > IIf( Name() == "AA", 5, > IIf( Name() == "C", 4, > IIf( Name() == "CAT", 6, > IIf( Name() == "GE", 7, > 0 ) ) ) ); > > AddToComposite( weight * C, "~test", "X" ); > > Buy = 0; > Graph0 = Foreign( "~test", "C" )/Foreign( "~test", "I" ); > > > It just plots dots, not linechart or anything. I would like to have a > index with OHLC but I don't know how... If anybody knows how to do > this, please help! > > > > --- In [email protected], Waleed Khalil <waleedkhalil@> wrote: > > > > Hi all > > can any one please tell me what is wrong withe wight part in this code > > > > weight = IIf( Name() == "elsh", 5, > > IIf( Name() == "unit", 4, > > IIf( Name() == "elka", 6, > > IIf( Name() == "ocdi", 7, > > IIf( Name() == "arei", 3, > > IIf( Name() == "mnhd", 3, > > IIf( Name() == "heli", 2, > > 0 ) ) ) )))); > > > > AddToComposite( Close, "~housing", "X" ); > > AddToComposite( V , "~housing", "V" ); > > AddToComposite( 1, "~housing", "I" ); > > > > Buy = 0; > > Graph0 = Foreign( "~housing", "C" )/Foreign( "~housing", "I" ); > > > > this code produces zero , but when i remove the weight part everything > > is ok and i get my curve > > thanks in advance > > Waleed > > >
