input:
threshold(1),
arwc_offset(1),
arwc_size(7),
arwc_textsize(10);
var:
Low_Breakout(false),
High_Breakout(false),
id_arwc(-1);
Low_Breakout = (high[1] + threshold) < high[2] and (high[3] + threshold) < high[2];
High_Breakout = (low[1] - threshold) > low[2] and (low[3] - threshold) > low[2];
if Low_Breakout and high > high[2] then
begin
plot1( high[2], "BO", red);
id_arwc = arw_new( date, time, low - arwc_offset, false);
arw_setcolor(id_arwc, blue);
arw_setsize(id_arwc, arwc_size);
arw_setstyle(id_arwc, 10);
arw_settext(id_arwc, "Buy");
arw_settextsize(id_arwc,arwc_textsize);
arw_settextcolor(id_arwc,Blue);
Arw_SetTextAttribute(id_arwc, 1, true);
end
else
if high_Breakout and Low < low[2] then
begin
plot1( low[2], "BO", red);
id_arwc = arw_new( date, time, high + arwc_offset, true);
arw_setcolor(id_arwc, red);
arw_setsize(id_arwc, arwc_size);
arw_setstyle(id_arwc, 10);
arw_settext(id_arwc, "Sell");
arw_settextsize(id_arwc,arwc_textsize);
arw_settextcolor(id_arwc,red);
Arw_SetTextAttribute(id_arwc, 1, true);
end;