PureBytes Links
Trading Reference Links
|
Hello,
I use P&F chart based on closing price by Graham Kavanagh, 17 Apr 2004. This is very helpfull tools for me.
Some time ago I found the following code for another PnF and I would like to implement Exploration Settings to Graham's PnF chart. Please help me. I try, try and nothing.
Best regards. Dominik
// part of code
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();
for (b = fr; b<to; b++)
{
Box = b/decimals;
pf(box);
btxt = NumToStr(b, 3.0);
eq2 = Cl[x] == Cl[x-2];
eq3 = eq2 && Cl[x-2] == Cl[x-4];
if(eq2)
{ if (direction[x] )
doubleTop = doubleTop + " " + btxt;
else
doubleBot = doubleBot + " " + btxt;
}
if (eq3)
{
if (direction[x] )
tripletop = tripletop + " " + btxt;
else
tripleBot = tripleBot + " " + btxt;
}
if ( eq3 == Cl[x-4]&& range[x-3] > range[x-1] && range[x-4] > 1.2* range[x-3])
{
if(direction[x])
AscTriangle = AscTriangle + " " + btxt;
else
DescTriangle = DescTriangle + " " + btxt;
}
match = 0;
for ( num = 1; num< 5; num++)
{
if( range[x]- range[x-num]==0)
match ++;
}
if (match ==4)
rectangle = rectangle + " " + btxt;
if (range[x]- range[x-1]== range[x-1]- range[x-2] && range[x-1]- range[x-2] == range[x-2] - range[x-3]
&& range[x]< range[x-1]&& range[x-4] > 1.2* range[x-3])
SymTriangle = SymTriangle + " " + btxt;
C1 = eq2 && Cl[x-4] == Cl[x-6];
C2 = AlmostEqual(Cl[x-2] - Cl[x-4], -box,50)&& !direction[x];
C3 = AlmostEqual(Cl[x-2] - Cl[x-4], box,50) && direction[x];
C4 = C2 || C3;
if( C1 && C2 || C1 && C3)
Catapult = Catapult + " " + 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);
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|