Has anybody seen Hawkeye indicator equivalent in afl?

#71
hi friends

HTML:
    IF DATACOMPRESSION >= 3 THEN Var13 = 1 ELSE Var13 = 2 ;
   IF DATACOMPRESSION >= 2 THEN Var14 = 2 ELSE Var14 = 3000000 ;

please read above faulty  two lines as below-suggested by mastermind007
corrected lines
   IF DATACOMPRESSION >= 3 THEN Var13 = 1 ELSE Var13 = 2 ;
   IF DATACOMPRESSION >= 2 THEN Var14 = 2 ELSE Var14 = 3 ;
regards
ford

Somehow I feel the trend dot thing looks at 5bar highest high and 5 bar lowest low points first then it goes over a bigger range of period like 10 or more to catch congestion high and congestion low.
Happysingh made a code for 5 bar high and low pivots.It needs to be modified to include congestion code,trend begins on break of congestion high or congestion low. It is here we seem to get stuck as regards to trend dots.
As for me the XMANH IS SOMETHING LIKE EMA(close,5,5 BARS FORWARD DISPLACED).it is just a displaced ema like that in alligator code.
Welcome your hints on this .
thanks
 

mastermind007

Well-Known Member
#72
hi friends

HTML:
    IF DATACOMPRESSION >= 3 THEN Var13 = 1 ELSE Var13 = 2 ;
   IF DATACOMPRESSION >= 2 THEN Var14 = 2 ELSE Var14 = 3000000 ;

please read above faulty  two lines as below-suggested by mastermind007
corrected lines
   IF DATACOMPRESSION >= 3 THEN Var13 = 1 ELSE Var13 = 2 ;
   IF DATACOMPRESSION >= 2 THEN Var14 = 2 ELSE Var14 = 3 ;
Replacing 300000 to 3 is just a guess... I don't yet know what was intended.

Somehow I feel the trend dot thing looks at 5bar highest high and 5 bar lowest low points first then it goes over a bigger range of period like 10 or more to catch congestion high and congestion low.
ISHL code that I posted earlier actually does nothing but pick up a 3 bar pivot but unlike most common pivot codes, this also checks for the Low. The same code with changed variable names is reproduced below to make it clearer. This code will identify the 3 point Pivot being the bar prior to the one that shows the symbol. In other words, triangles will pop up on the candle immediately after the Pivot.

Relative to 5 bar pivot, 3 bar pivot will find entry one candle sooner right but also carries the risk of having jumped the gun during complex corrections.

Code:
upperPivot = (Ref(High, -1) >= High And Ref(High, -2) <= Ref(High, -1) And Ref(Low, -1) >= Low And Ref(Low, -2) <= Ref(Low, -1)) ;
lowerPivot = (Ref(High, -1) <= High And Ref(High, -2) >= Ref(High, -1) And Ref(Low, -1) <= Low And Ref(Low, -2) >= Ref(Low, -1)) ;
Plot(C, "", colorBlack, styleCandle);
PlotShapes(upperPivot * shapeDownTriangle + lowerPivot * shapeUpTriangle, IIf(upperPivot, colorRed, colorBlue), 0, IIf(upperPivot, High, Low), -12);
As for me the XMANH IS SOMETHING LIKE EMA(close,5,5 BARS FORWARD DISPLACED).it is just a displaced ema like that in alligator code.
Thats it!!! Thats all that XMANH does? @#$@$@

That would be very easy to translate in AFL ...

Code:
function XMANH(x, y, z) { return Ref(EMA(x, abs(y)), -abs(z)); }
 
Last edited:
#73
hI Mastermind007

Thanks for more inputs.

I wonder what does this following ELD code mean really(after figuring out xmanh(c,5,5) )
here trend is separated as 1 or -1,uptrend or downtrend.


HTML:
IF XMANH (CLOSE, 5, 5) > XMANH (CLOSE, 5, 5)[Var13] THEN Var11 = 1 ;
   IF XMANH (CLOSE, 5, 5) <= XMANH (CLOSE, 5, 5)[Var13] THEN Var11 =-1 ;
   IF Var10[1] = 1 AND XMANH (CLOSE, 5, 5) <= XMANH (CLOSE, 5, 5)[Var13] AND CLOSE <= XMANH (CLOSE, 5, 5)[Var13] THEN Var10 = 0 ;
   IF Var10[1] =-1 AND XMANH (CLOSE, 5, 5) >= XMANH (CLOSE, 5, 5)[Var13] AND CLOSE >= XMANH (CLOSE, 5, 5)[Var13] THEN Var10 = 0 ;
please take a look at following afl-it is not correct .



HTML:
//mastermind007  3bar pivots

upperPivot = (Ref(High, -1) >= High AND Ref(High, -2) <= Ref(High, -1) AND Ref(Low, -1) >= Low AND Ref(Low, -2) <= Ref(Low, -1)) ;
lowerPivot = (Ref(High, -1) <= High AND Ref(High, -2) >= Ref(High, -1) AND Ref(Low, -1) <= Low AND Ref(Low, -2) >= Ref(Low, -1)) ;
Plot(C, "", colorBlack, styleCandle);
PlotShapes(upperPivot * shapeDownTriangle + lowerPivot * shapeUpTriangle, IIf(upperPivot, colorRed, colorBlue), 0, IIf(upperPivot, High, Low), -12);
x=Close; y=5; z=5;
function 
XMANH(x, y, z) {
 return
 Ref(EMA(x, abs(y)), -abs(z));
 }

Plot(XMANH(C,5,5),"XMANH(C,5,5)",colorRed,styleThick);
kk = XMANH(C,5,5);
//===========================================================
/* ELD CODE  HAWKEYETREND

if XMANH (Close, 5, 5) > XMANH (Close, 5, 5)[Var13] THEN Var11 = 1 ;
   if XMANH (Close, 5, 5) <= XMANH (Close, 5, 5)[Var13] THEN Var11 =-1 ;
   if Var10[1] = 1 AND XMANH (Close, 5, 5) <= XMANH (Close, 5, 5)[Var13] AND Close <= XMANH (Close, 5, 5)[Var13] THEN Var10 = 0 ;
   if Var10[1] =-1 AND XMANH (Close, 5, 5) >= XMANH (Close, 5, 5)[Var13] AND Close >= XMANH (Close, 5, 5)[Var13] THEN Var10 = 0 ;

*/
//===============================================================
//atrlevels for stops  based on 1.75*ATR
LongStop = HHV( KK - 1.75 * ATR(10), 15 );
Plot(LongStop,"LongStop",colorBlue,8+16);
ShortStop = LLV(KK + 1.75* ATR(10),15);
Plot(ShortStop,"ShortStop",colorCustom12,8+16);
//yet to improve code to plot only longstop or only shortstop at one time
-----------------------------------------------------------------------
suppose we say plot longstop if c cross above xmanh line and plot shortstop if c cross below xmanh line
can we get this as afl code line so that based on xmanh line we plot just one stop at a time?
--------------------------------------------------------------------
please comment
1 does the xmanh line separate uptrend & downtrend ?
2.can we plot only the longstop if uptrend and plot only shortstop if downtrend
Grateful for encouragement and contribution by Ampa and Mastermind007.


QUERY
AFTER XMANH THING THERE IS VAR13 that helps decide trendup or down.
still guessing how to get near var13 and link it to xmanh.


regards
ford
 
Last edited:

KelvinHand

Well-Known Member
#74
hI Mastermind007


function
XMANH(x, y, z) {
return
Ref(EMA(x, abs(y)), -abs(z));
}
Should be this function.
PHP:
function XManh(Price, Len, LenSXMA)
{
   return EMA(EMA(Price,Len), LenSXMA);
}
I tested and compare on TS and Ami with mastermind's version with
Plot( XMANH (Close, 5, 5), "test", colorAqua);

The above more smooth and close to TS.
 
Last edited:
#75
Hi KelvinHand

Thank you for providing this critical input on XMANH thing.It is a morale booster
for us.

Appreciate your take on trend dots green red white with price bars if you get time.

regards
Ford
 

xsis

Active Member
#76
dear frds - sorry for disturbing the flow! but thot that its relevant here to ask. pls allow me.

can someone pls help me in getting decompiler for metatrader where i can decompile ex4 files i.e. EX4-TO-MQ4? i some how found purebeam.biz reference. but again unable to find the exe just like i failed to get the same from various threads of traderji forum.

pls help!
 
#78
hi mastermind007

I saw 3 bar pivot code in your post.
HTML:
//mastermind007  3bar pivots

upperPivot = (Ref(High, -1) >= High AND Ref(High, -2) <= Ref(High, -1) AND Ref(Low, -1) >= Low AND Ref(Low, -2) <= Ref(Low, -1)) ;
lowerPivot = (Ref(High, -1) <= High AND Ref(High, -2) >= Ref(High, -1) AND Ref(Low, -1) <= Low AND Ref(Low, -2) >= Ref(Low, -1)) ;
Can you please give similar code for 5 bar pivots?
I am looking for price bars and trend dots in green-red-white code-the dots are linked to pivots i believe.
Thanks
ford7k
 

xsis

Active Member
#79
dear ford bro

i tried it in metatrader section with a new thread with 67 views. but didnt get any response.
please anybody help.

thks

hi xsis
please post it under metatrader section.
somebody will help you there
cheers
dear frds - sorry for disturbing the flow! but thot that its relevant here to ask. pls allow me.

can someone pls help me in getting decompiler for metatrader where i can decompile ex4 files i.e. EX4-TO-MQ4? i some how found purebeam.biz reference. but again unable to find the exe just like i failed to get the same from various threads of traderji forum.

pls help!
 
#80
xsis

I dont know what to say
you seem to be like a man having account in ICICI BANK BUT GO TO HDFC BANK AND ASK FOR MONEY.
This is an amibroker area and you demand metatrader stuff here.
do you want the moderator to ban you?
 

Similar threads