setting for buy sell arrow

Joined
Sep 29, 2010
Messages
85
Likes
12
#1
anybody help me please , if price close above the gann(green line) line buy, and if price close below the gann(redline) line and sell with arrow

thanks a lot for advance


/*Gann HiLo*/

Hld = IIf(C > Ref(MA(H, 8), -1), 1, IIf(C < Ref(MA(L, 8), -1), -1, 0));
Hlv = ValueWhen(Hld != 0, Hld, 1);
Hilo = IIf(Hlv == -1, MA(H, 8), MA(L, 8));
Trigger = IIf(C>Hilo, colorCustom9, colorCustom5);

Plot(Hilo, _DEFAULT_NAME(), Trigger, styleStaircase);
 

johnnypareek

Well-Known Member
Joined
Jun 14, 2006
Messages
864
Likes
585
#2
Hi,

Here it is :)

HTML:
/*Gann HiLo*/
per=Optimize("Per",Param("Per",8,1,55,1),1,55,1);

Hld = IIf(C > Ref(MA(H, per), -1), 1, IIf(C < Ref(MA(L, per), -1), -1, 0));
Hlv = ValueWhen(Hld != 0, Hld, 1);
Hilo = IIf(Hlv == -1, MA(H, per), MA(L, per));
Trigger = IIf(C>Hilo, colorCustom9, colorCustom5);
Plot(C,"",1,128);
Plot(Hilo, _DEFAULT_NAME(), Trigger, styleStaircase);
SetPositionSize( 50, spsShares );
Buy=Cross(C,Hilo);
Sell=Cross(Hilo,C);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-25); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-25);
enjoy
 
Last edited:
Joined
Dec 18, 2011
Messages
70
Likes
19
#5
Hi johnnypareek,

Awesome!!Thanks very much.Since starting using Amibrkr 4 months back struggling to

get these arrows.But the formula makes another chart with arrows ,can the arrows

shown in main chart?

cheers

thanks

PKJee
 
Joined
Sep 29, 2010
Messages
85
Likes
12
#6
One Goodies included if u didn't noticed. right ckick on chart and in parameter u can change the default time of 8 to 1-55
johnnypareek bro please could u setting gann hi lo afl, only line without price bar chart, thanks again!:thumb:
 

sr114

Well-Known Member
Joined
Sep 23, 2005
Messages
1,904
Likes
1,638
Location
India
#7
johnnypareek bro please could u setting gann hi lo afl, only line without price bar chart, thanks again!:thumb:
/*Gann HiLo*/
per=Optimize("Per",Param("Per",8,1,55,1),1,55,1);

Hld = IIf(C > Ref(MA(H, per), -1), 1, IIf(C < Ref(MA(L, per), -1), -1, 0));
Hlv = ValueWhen(Hld != 0, Hld, 1);
Hilo = IIf(Hlv == -1, MA(H, per), MA(L, per));
Trigger = IIf(C>Hilo, colorCustom9, colorCustom5);
//Plot(C,"",1,128);
Plot(Hilo, _DEFAULT_NAME(), Trigger, styleStaircase);
SetPositionSize( 50, spsShares );
Buy=Cross(C,Hilo);
Sell=Cross(Hilo,C);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-25);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-25);
courtsey - Jhonny Bhai

use this piece of code and u will get only the hilo lines and not the close part.

sr
 
Last edited:
Joined
Jul 12, 2012
Messages
16
Likes
0
#9
anybody help me please , if price close above the gann(green line) line buy, and if price close below the gann(redline) line and sell with arrow

thanks a lot for advance


/*Gann HiLo*/

Hld = IIf(C > Ref(MA(H, 8), -1), 1, IIf(C < Ref(MA(L, 8), -1), -1, 0));
Hlv = ValueWhen(Hld != 0, Hld, 1);
Hilo = IIf(Hlv == -1, MA(H, 8), MA(L, 8));
Trigger = IIf(C>Hilo, colorCustom9, colorCustom5);

Plot(Hilo, _DEFAULT_NAME(), Trigger, styleStaircase);
i didnt get u ...pls explain me wht is tht. Thnx in advnce.
 

Similar threads

Broker Special Offers