[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:ActivityBar Study



PureBytes Links

Trading Reference Links


Below is an AB Study that plots the Price Distribution on 30 Min Bars, you will
notice the lack of a plot statement.

Under that is a simple trade signal using ABs.

{~~~~~~~~~~~~ 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);


AvgVal = Average(Close, AvgLength);
ModePrice = AB_ModePrice(RightSide);


If Open of Next Bar > ModePrice AND AvgVal > AvgVal[1] Then
 Buy Next Bar at Market;

 
If Open of Next Bar < AB_GetZoneLow(RightSide) AND AvgVal < AvgVal[1] Then
 Sell Next Bar at Market;

If Open of Next Bar < ModePrice AND AvgVal < AvgVal[1] Then
 ExitLong ("LX1")  Next Bar at Market;


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