PureBytes Links
Trading Reference Links
|
I am not sure what your trying to plot but this will plot the Price Distribution
on a 30 min bar chart. And below that is a simple signal using activity bars.
You'll notice that they don't use a plot statement.
{****************************Price Distribution******************************}
Inputs: ZoneStdDev(1), IntervalColors(True), IntervalMinutes(30),
NonIntColor(DarkGreen), ApproxNumRows(10);
Variables: CellColor(0), AB(0), ABSDev(0), ModePrice(0), HZone(0), LZone(0);
AB_SetRowHeight(AB_RowCalc(ApproxNumRows, 3));
If IntervalColors Then
CellColor = AB_ColorIntervals(BarStatus(1), IntervalMinutes, BarInterval Data1)
of ActivityData;
If IntervalColors = False OR CellColor = -1 Then
CellColor = NonIntColor;
AB = AB_AddCellRange(High ActivityData, Low ActivityData, RightSide,
NumToStr(CellColor, 0), CellColor, 0);
IF DataCompression of ActivityData > 0 Then Begin
ABSDev = AB_StdDev(ZoneStdDev, RightSide);
ModePrice = AB_ModePrice(RightSide);
HZone = MinList(High, ModePrice + ABSDev);
LZone = MaxList(Low, ModePrice - ABSDev);
If HZone <> 0 AND LZone <> 0 Then
AB_SetZone(HZone, LZone, RightSide);
End;
{***************************Price Distribution Signal*******************}
Inputs: AvgLength(3);
Variables: AvgVal(0), ModePrice(0);
{Calculation Variables}
AvgVal = Average(Close, AvgLength);
ModePrice = AB_ModePrice(RightSide);
{Long Entry}
If Open of Next Bar > ModePrice AND AvgVal > AvgVal[1] Then
Buy Next Bar at Market;
{Short Entry}
If Open of Next Bar < AB_GetZoneLow(RightSide) AND AvgVal < AvgVal[1] Then
Sell Next Bar at Market;
{Long Exit (Next Open)}
If Open of Next Bar < ModePrice AND AvgVal < AvgVal[1] Then
ExitLong ("LX1") Next Bar at Market;
{Short Exit (Next Open)}
If Open of Next Bar > ModePrice Then
ExitShort ("SX1") Next Bar at Market;
____________________Reply Separator____________________
Subject: ActivityBar Study
Author: EFG Stars
Date: 6/29/99 6:48 PM
Hi All,
ActivityBar TS2k.
Simplest Indicator.
Value1=AB_ModePrice(RigthSide);
Plot1(value1,"Plot1");
CommentaryCL("ModePrice=" ,AB_ModePrice(RightSide):0:4,)
===========
Commentary shows correct numbers.
Plot1 produced very strange line.
Any sudgestions?
Vladimir
Los Angeles
|