Académique Documents
Professionnel Documents
Culture Documents
SetChartOptions(0,chartShowArrows|chartShowDates);
bk=ParamColor( "Bk col",colorDarkGrey);
SetChartBkColor(bk);
SetBarFillColor(IIf(C>O,colorBrightGreen,IIf(C<=O,colorRed,colorLightGrey)));
Plot(C," | Demand & supply |\nPrice",47,64,0,0,0,0);
sr=ParamToggle("Plot Supp/Res lines","No|Yes" ,1);
Per=Param("Sensitivity",1.5,0.5,5,0.5);
g=Param("No.of Lines",1,1,5,1);
x=Cum(1);
Pk1=PeakBars(H,per,1)== 0;
Tk1=TroughBars(L,per,1)== 0;
px1=LastValue(ValueWhen(pk1,x,1));
px2=LastValue(ValueWhen(Pk1,x,2));
px3=LastValue(ValueWhen(Pk1,x,3));
px4=LastValue(ValueWhen(pk1,x,4));
px5=LastValue(ValueWhen(Pk1,x,5));
tx1=LastValue(ValueWhen(Tk1,x,1));
tx2=LastValue(ValueWhen(Tk1,x,2));
tx3=LastValue(ValueWhen(Tk1,x,3));
tx4=LastValue(ValueWhen(Tk1,x,4));
tx5=LastValue(ValueWhen(Tk1,x,5));
XT1
XT2
XT3
XT4
XT5
=LastValue(ValueWhen(pk1,H,1));XT1c
=LastValue(ValueWhen(Pk1,H,2));XT2c
=LastValue(ValueWhen(Pk1,H,3));XT3c
=LastValue(ValueWhen(pk1,H,4));XT4c
=LastValue(ValueWhen(Pk1,H,5));XT5c
=LastValue(ValueWhen(pk1,Max(C,O),1));
=LastValue(ValueWhen(pk1,Max(C,O),2));
=LastValue(ValueWhen(pk1,Max(C,O),3));
=LastValue(ValueWhen(pk1,Max(C,O),4));
=LastValue(ValueWhen(pk1,Max(C,O),5));
YT1
YT2
YT3
YT4
YT5
=LastValue(ValueWhen(tk1,L,1));YT1c
=LastValue(ValueWhen(tk1,L,2));YT2c
=LastValue(ValueWhen(tk1,L,3));YT3c
=LastValue(ValueWhen(tk1,L,4));YT4c
=LastValue(ValueWhen(tk1,L,5));YT5c
=LastValue(ValueWhen(tk1,Min(O,C),1));
=LastValue(ValueWhen(tk1,Min(O,C),2));
=LastValue(ValueWhen(tk1,Min(O,C),3));
=LastValue(ValueWhen(tk1,Min(O,C),4));
=LastValue(ValueWhen(tk1,Min(O,C),5));