AHG - Profitable Strategy for Struggling Traders

Status
Not open for further replies.
Quote from JDConner:

Here's my 1-2-3 pivot, blue = long, yellow = short.

JD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

JD

1-2-3-pivot?? Please help
Code + eld available please?

Thanks
Charly
 
Quote from Anekdoten:

Attached please find TS/MC/etc Three Bar Reversal Paintbar ELD using high or low not close.

Anek

For those using Amibroker I coded the n bar reversal, posted by Anek.
You can select in the parameters dialog window, the number of bars to calculate for the reversal from 2 to 50.
You can also select the value(close, high, low etc,) to calculate the reversal up and reversal down

for "advanced" users
You can also choose to show bars painted or arrows for the signal, you need to uncomment the code that's commented now and comment the code for the arrows.


here is the code in txt


P = ParamField( "Price field Reversal UP",field = 1 );
P2 = ParamField( "Price field Reversal DOWN", field = 2 );
n= Param("No. of Bars",3,2,50,1);
TrendUp = P > Ref(HHV(H,n),-1);
TrendDn = P2 < Ref(LLV(L,n),-1);
/*TrendUp = ExRem(TrendUp,TrendDn);
TrendDn = ExRem(TrendDn,TrendUp);
PlotShapes(TrendUp*shapeUpArrow,colorGreen);
PlotShapes(TrendDn*shapeDownArrow,colorRed);*/
Plot(C,"Close",IIf(TrendUp, colorGreen, IIf(TrendDn,colorRed,colorBlack)),styleCandle);





attached you'll find the AFL code, enjoy
 

Attachments

Quote from JDConner:

Mark,

Heres the code, its my first code to write so if you can improve on it I would appreciate it.


JD

keep in mind I never used Ensign code, anyway

I can see you have merged anek painted bars with your interpretation of 123 pivot.... duh!!!! i can see that on your chart as well :p .

Ok now focusing on the 123 pivot , this should be the plain English version of your code:

Paint the previous candle blue if : the LOW of 1 bar ago is lower than the LOW of 2 bars ago AND the LOW of 2 bars ago is lower than the LOW of 3 bars ago AND the low of 1 bar ago is lower than the current bar AND the HIGH of 1 bar ago bar is lower than the HIGH of the current bar.

reverse for the yellow bar

Ok so basically the blue bar (or yellow) is painted blue only when the next bar confirms an higher HIGH than the "possible" blue bar, so you actually need another bar to confirm the yellow/blue.

Heh ok it works just like my code, only I was more strict and wanted to see Lower Highs in the same bar along with lower lows, you just use lower lows.

Maaaaan, I thought you had found the HOLLLLYYYGRAAAAILLL! mmbhuuahaha :D

First time you code? great job dude!

I'll post later my rules so you can try the difference, I have less signals obviously
 
BlueCandleBuy=H>Ref(H,-1) AND Ref(H,-1)> Ref(H,-2) AND Ref(L,-1)> Ref(L,-2) AND Ref(L,-2)< Ref(L,-3)AND Ref(H,-2)<Ref(H,-3)


Reverse for yellow candle

these are my rules at the moment (i'm always tweaking...lol)

Ref(H, -1) means the previous bar High, the rest should be self explainatory

whait a sec the code is not complete ,ill attach a txt file
 
here's the complete code


edit: jesus what a mess, sorry.

this code actually signals the bar where you should enter , after the pivot candle is confirmed not the pivot candle itself...man I need some rest
 

Attachments

Hi mark1,
thanks for your help with amibroker code, as I am very inexperienced “coder” with amibroker.
That code looks interesting. I am now experimenting also with High vs Close 3 bars reversal. Looks
like may work on 5 minute charts also... Please keep coding and posting so we can all keep tweaking together :)
 
Quote from ronald tr:

Hi mark1,
thanks for your help with amibroker code, as I am very inexperienced “coder” with amibroker.
That code looks interesting. I am now experimenting also with High vs Close 3 bars reversal. Looks
like may work on 5 minute charts also... Please keep coding and posting so we can all keep tweaking together :)

You are welcome Ronald, thanks to Anek for showing us the code
 
Status
Not open for further replies.
Back
Top