Professional Documents
Culture Documents
symbol = Name();
ccy2= StrRight(symbol,3);
Ccy1= StrLeft(symbol,3);
decimals=IIf(ccy2 == "JPY" || Ccy1 == "XAU", 100, 10000);
Reverse = 3;//Param("Reverse",3, 1, 5, 1);
procedure pf(box)
{
global x;
global direction;
global range;
global Cl;
global Chg2;
j = 0;
Lo[0] = Box * ceil(L[0]/Box) ;
Hi[0] = Lo[0] + box;
direction = 0;
range = 0;
}
}
}
}
x = BarCount - 1;
delta = x -j;
direction = Ref(direction, - delta);
Hi = Ref(Hi, -delta) + Box/2;
Lo = Ref(Lo, -delta)- Box/2;
Cl = IIf(direction == 1, Hi, Lo);
Op = IIf(direction == 1, Cl - Box, Cl + Box);
range = round((Hi-Lo)/box);
Chg2 = round(Cl - Ref(Cl, -2)/box);
}
pattern = "";
doubleTop = "";
tripleTop = "";
tripleBot = "";
AscTriangle = "";
DescTriangle = "";
doubleBot ="";
rectangle = "";
SymTriangle = "";
Catapult = "";
_SECTION_BEGIN("Exploration Settings");
fr = Param("from", 3, 3, 100,1);
to = Param("to", 50, 10, 100,1)+1;
_SECTION_END();
if(eq2)
{ if (direction[x] )
doubleTop = doubleTop + " " + btxt;
else
doubleBot = doubleBot + " " + btxt;
}
if (eq3)
{
if (direction[x] )
tripletop = tripletop + " " + btxt;
else
tripleBot = tripleBot + " " + btxt;
}
match = 0;
for ( num = 1; num< 5; num++)
{
if( range[x]- range[x-num]==0)
match ++;
}
if (match ==4)
rectangle = rectangle + " " + btxt;
Filter = 1;
format = 8.0;
CellWidth = 70;
//AddTextColumn( doubleTop, "DoubleTop", format, colorBlue,
colorDefault, CellWidth);
//AddTextColumn( doublebot, "DoubleBottom", format, colorRed,
colorDefault, CellWidth);
AddTextColumn( tripleTop, "TripleTop", format, colorBlue,
colorDefault, CellWidth);
AddTextColumn( tripleBot, "TripleBottom", format, colorRed,
colorDefault, CellWidth);
AddTextColumn( AscTriangle, "AscTriangle", format, colorBlue,
colorDefault, CellWidth);
AddTextColumn( DescTriangle, "DescTriangle", format, colorRed,
colorDefault, CellWidth);
AddTextColumn( rectangle, "Range", format, colorGrey50,
colorDefault, CellWidth);
AddTextColumn( symTriangle, "SymTriangle", format, colorGrey50,
colorDefault, CellWidth);
AddTextColumn( catapult, "Catapult", format, colorGrey50,
colorDefault, CellWidth);