This is the code of the amibroker charting software and now i have half done with this code to convert to java script but some thing is wrong with this can any one help with this code complete.
no=Param( "d", 10, 1, 100 );
\\number = parameter ( ''name'', defaultval, min, max,);
res = HHV(H,no);
\\res = high highest value (array,period)
sup = LLV(L,no);
\\sup = Low Lowest Value (array,Period)
avd = IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1…
\\IIf( EXPRESSION, TRUE_PART, FALSE_PART )
avn = ValueWhen(avd!=0,avd,1);
\\valuewhen(EXPRESSION, ARRAY, n = 1)
tsl = IIf(avn==1,sup,res);
\\IIf( EXPRESSION, TRUE_PART, FALSE_PART )
Plot(tsl, _DEFAULT_NAME(), colorRed, styleStaircase);
\\Plot( array, name, color/barcolor, style = styleLine, minvalue = {empty}, maxvalue = {empty}, XShift = 0, Zorder = 0 )
Plot( 2, "Ribbon",IIf(C>tsl,colorBlue,colorRed),s… -0.5, 100 );
\\Plot( array, name, color/barcolor, style = styleLine, minvalue = {empty}, maxvalue = {empty}, XShift = 0, Zorder = 0 )
Buy=Cross(C,Ref(res,-1));
\\Cross( ARRAY1, ARRAY2 )
Sell=Cross(Ref(sup,-1),C);
\\Cross( ARRAY1, ARRAY2 )
shape=Buy*shapeUpArrow + Sell*shapeDownArrow;
PlotShapes(shape,colorRed,0,IIf(Buy,Lo…
\\PlotShapes( shape, color, layer = 0, yposition = graph0, offset = -12 );
Buy=Cross(C,tsl);
Sell=Cross(tsl,C);
This was i tried what was wrong in this
var n = Param(1);
var m = Param(2);
var HHV = Max(High(),n);
var LLV = Min(Low(),m);
var close = Close();
var HHV-LLV = CreateArray(close.length);
for(var i=0; iAddGraph(HHV,LLV);
if(HHV AddBuySignal(i);
else
if(LLV>Close())
AddSellSignal(i);
this was i tried and i dont know what i am missing in it, can anyone tell me where i am missing it.