_SECTION_BEGIN("MAD");
T=80;
KMA=((C-MA(C,T))/MA(C,T))*100;
Graph0=KMA;
Graph0BarColor=IIf(KMA>0,5,4);
cx=Param("cxposn",810,0,1200,1);
cy=Param("cyposn",37,0,1000,1);
GfxSetBkColor(ColorRGB(200,50,100));
GfxSelectFont( "Bodoni MT",22,98, False);
GfxSetTextColor( colorYellow);
GfxTextOut("LTP. "+C+" ", cx, cy );
_SECTION_END();
_SECTION_BEGIN("Name");
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/20);
GfxSetTextAlign( 6 );
GfxSetTextColor( ColorHSB( 10, 300, 20 ) );
GfxSetBkMode(0);
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/20 );
_SECTION_BEGIN("Time Left");
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
x=Param("xposn",300,0,1000,1);
y=Param("yposn",50,0,1000,1);
GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 223, 100, 230 ), 3 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
//Say( "New period" );
}
GfxRoundRect( x+135, y+538, x+265, y+512, 0,0 );
GfxSetBkMode(1);
GfxSelectFont( "Arial", 14, 800, False );
GfxSetTextColor( colorBlack );
GfxTextOut( "Timeleft"+" : "+NumToStr( SecsToGo, 1.0 ), x+200, y+515 );
_SECTION_END();
_SECTION_END();
_SECTION_BEGIN("mo");
mo();
_SECTION_END();
_SECTION_BEGIN("BS-Text");
ABC=SS_C1();
CD=SS_C2();
AA = SS_A1();
BB = SS_B1();
pos = 4.9*ATR(5);
for( i = 0; i < BarCount; i++ ) {
if( ABC[i] ) PlotText( "BUY * STOCKXRAY @\n" +AA[i], i, Low[i] - pos[i], colorAqua, Offset=-10 );
if( CD[i] ) PlotText( "SELL * STOCKXRAY @\n" + BB[i], i, Low[i] + pos[i], colorRose, Offset=-10 );
}
_SECTION_END();
_SECTION_BEGIN("ADX");
range = Param("ADX Periods", 7, 2, 200, 1 );
Col_adx = IIf(ADX(range) > Ref(ADX(range),-1) AND ADX(range) > 20,colorBlue, colorGrey40);
em = Param("EMA Of ADX",3,1,20,1);
p = EMA(PDI(range),em);
m = EMA(MDI(range),em);
//Plot( ADX(range), _DEFAULT_NAME(), Col_adx , ParamStyle("ADX style", styleThick ) );
btp = BBandTop( P, 5, 0.4 );
bbp = BBandBot( P, 5, 0.4 );
btm = BBandTop( m, 5, 0.4 );
bbm = BBandBot( m, 5, 0.4 );
//Plot(btp , "" , colorDarkGreen, styleDashed );
//Plot(bbp , "" , colorDarkGreen, styleDashed );
//Plot( btm, "" , colorDarkRed, styleDashed );
//Plot( bbm, "" , colorDarkRed, styleDashed );
Col_p = IIf(p > btp, colorBrightGreen,colorDarkGreen);
Col_m = IIf(m > btm,colorRed,colorDarkRed);
//Plot( p, "+DI", Col_p, styleDots );
//Plot( M, "-DI", Col_m, styleDots );
Buy = ADX(range) > MDI(range) AND PDI(range) > MDI(range);
Sell = ADX(range) > PDI(range) AND MDI(range) > PDI(range);
Buy_sell = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));
trend = IIf(col_p==colorBrightGreen,colorBrightGreen,IIf(c ol_m==colorRed,colorRed,IIf(PDI(range) > MDI(range),colorDarkGreen,colorDarkRed)));
//Plot(6, "", Buy_sell, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();
_SECTION_BEGIN("B");
SetChartBkColor(colorPaleBlue);
Buy_p = p > btp OR m < bbm;
Buy_p1 =p > btp AND m < bbm;
Sell_m = m > btm OR p < bbp;
Sell_m1 = m > btm AND p < bbp;
bs = IIf(O>bb,colorBrightGreen,IIf(O<aa,colorRed,IIf(Bu y_p AND Sell_m,colorWhite,IIf(Buy_p,colorBlue,IIf(Sell_m,c olorPink,colorBlack)))));
HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose,"" , bs, styleCandle| styleNoLabel );
_SECTION_END();
_SECTION_BEGIN("MSG");
SS_Mo();
E30 = SS_E1();
F30 = SS_E2();
GO=(CD+(E30*0.0038));
JO=(ABC-(E30*0.0038));
so=(CD+(E30*0.0055));
PO=(ABC-(E30*0.0055));
ABC=SS_C1();
CD=SS_C2();
messageboard = ParamToggle("","",0);
exitlong = CD;
exitshort = ABC;
BT1 = SS_BT1();
BT2 = SS_BT2();
BT3 = SS_BT3();
BT4 = SS_BT4();
ST1 = SS_ST1();
ST2 = SS_ST2();
ST3 = SS_ST3();
ST4 = SS_ST4();
for(i=BarCount-1;i>1;i--)
{
if(ABC[i] == 1)
{
BT11 = BT1[i];
BT22 = BT2[i];
BT33 = BT3[i];
BT44 = BT4[i];
entry = AA[i];
sig = "ABC";
tar1 = BT11;
tar2 = BT22;
tar3 = BT33;
tar4 = BT44;
bars = i;
i = 0;
}
if(CD[i] == 1)
{
sig = "CD";
ST11 = ST1[i];
ST22 = ST2[i];
ST33 = ST3[i];
ST44 = ST4[i];
entry = BB[i];
tar1 = ST11;
tar2 = ST22;
tar3 = ST33;
tar4 = ST44;
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "ABC", colorBlue,colorDarkRed);
Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "", Clr, styleLine, Null, Null, Offset);
for (i=bars; i <BarCount;i++)
{
//PlotText(""+sig+"@"+entry, BarCount+4,entry,Null,colorBlue);
PlotText("T1*"+tar1,BarCount+4,tar1,Null,Clr);
PlotText("T2* "+tar2,BarCount+4,tar2,Null,Clr);
PlotText ("LT1* "+tar3,BarCount+4,tar3,Null,Clr);
PlotText ("LT2* "+tar4,BarCount+4,tar4,Null,Clr);
}
printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + " (" + WriteVal(IIf(sig == "CD",entry-C,C-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "ABC",(C-entry),(entry-C)),2.2));
if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 10, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
if ( sig =="ABC")
{
GfxSelectSolidBrush( colorBlue );
}
else
{
GfxSelectSolidBrush( colorRed );
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 3;
x2 = 210;
y = pxHeight;
GfxSelectPen( colorWhite, 5);
GfxRoundRect( x, y - 180, x2, y -1, 80, 150 ) ;
GfxTextOut( ( " * STOCKXRAY MAGIC * "),101,y-173);
GfxSetTextColor(ColorRGB(100,300,200));
GfxTextOut( (" STOP LOSS : " + WriteVal(IIf(sig == "ABC",(E30-SO),(E30-PO)),2.1)), 90, y-117);;
GfxTextOut( (" SECURED SL # REVERSE TREND "), 105, y-100);
GfxSetTextColor( colorWhite );
GfxTextOut( ("TGT:1 : " + tar1), 101, y -82);
GfxTextOut( ("TGT:2 : " + tar2), 100,y-62);
GfxSetTextColor( colorGold );
GfxTextOut( ("LONG TGT 1 : " + tar3), 100,y-43);
GfxTextOut( ("LONG TGT 2 : " + tar4), 100,y-24);
GfxSetTextColor( colorBrightGreen );
GfxTextOut( (" CURRENT P/L : " + WriteVal(IIf(sig == "ABC",(C-entry),(entry-C)),2.1)), 90, y-155);
GfxSelectFont("Tahomabold", 10.4, 100 );
GfxSetTextColor(ColorHSB(30,4,250));
GfxTextOut( (" BEST OPPORTUNITY * " + WriteVal(IIf(sig == "ABC",(E30-GO),(E30-JO)),2.1)), 103, y-135);;
GfxSetTextColor(ColorRGB(10,250,250));
GfxTextOut( ( " Develop By "),950,y-40);
GfxSetTextColor(ColorRGB(10,250,250));
GfxTextOut( ( "* STOCKXRAY SYSTEM * "),950,y-20);
}
_SECTION_BEGIN("Breakout");
breakout = ParamToggle("BREKOUT","No|Yes",1);
PP1 = SS_PP1();
PPA1 = SS_PPA1();
PP2 = SS_PP2();
PPA2 = SS_PPA2();
Asd=IIf(breakout,PPA1,PPA2);
Lkj=IIf(breakout,PP1,PP2);
Plot(IIf(breakout,PPA1,PPA2),"Best Up",colorBlack,4+8+2048);
Plot(IIf(breakout,PP1,PP2),"Best Dn",colorBlack,4+8+2048);
_SECTION_END();
_SECTION_END();
//Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorPink ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
_SECTION_BEGIN("zone");
TimeFrameSet(60*in1Minute);
//SS_Z1
st = SS_Z1();
TimeFrameRestore(); // restore time frame to original
uptrendf=TimeFrameExpand(st , 60*in1Minute);
//downtrendf=TimeFrameExpand( downtrend, 15*in1Minute);
Colorf=TimeFrameExpand (colorGold, 60*in1Minute);
Plot( 2, "zone",IIf(O>uptrendf,colorBrightGreen,colorRed),s tyleOwnScale|styleArea|styleNoLabel,1, 100,1);
_SECTION_END();
_SECTION_BEGIN("93");
ORBHigh = SS_Z2();
ORBLow = SS_Z3();
yy=Cross(f30,ORBHigh);
tt=Cross(ORBLow,f30);
PlotShapes(shapeStar*yy,colorWhite,0,O,-20);
PlotShapes(shapeStar*tt,colorBlack,0,O,20);
ww=Cross(f30,tar2);
qq=Cross(tar2,f30);
PlotShapes(shapeHollowStar*ww,colorDarkBlue,0,L,-20);
PlotShapes(shapeHollowStar*qq,colorViolet,0,H,20);
_SECTION_END();
_SECTION_BEGIN("Volume");
cx = Param("cxposn",1000,0,1200,1);
cy = Param("cyposn", 6,0,1000,10 );
GfxSelectFont( " Arial ", 18, 98, False );
GfxSetTextColor( colorWhite );
GfxTextOut("Volume " +Volume+ "", cx-300,cy +555);
_SECTION_END();
_SECTION_BEGIN("Title");
DDayO = TimeFrameGetPrice("O", inDaily);
DHiDay = TimeFrameGetPrice("H", inDaily);
DLoDay = TimeFrameGetPrice("L", inDaily);
prvC = TimeFrameGetPrice("C", inDaily, -1);//close
Title = EncodeColor(ColorRGB(10,10,350))+"* STOCKXRAY * "+EncodeColor(colorWhite)+ Name() + ", " + Interval(2) + ", " + Date() +
EncodeColor(colorBrightGreen) + "\nO " + EncodeColor(colorBrightGreen) + O +
", H : " + H +
", L : " + L+ EncodeColor(colorOrange) +
" ~ Prev Close : " + EncodeColor(colorPink) + prvC +EncodeColor(colorGold)+
"\n Day-Open : " +DDayO + " Day-High : " +DHiDay + " Day-Low : "+ DLoDay ;
_SECTION_END();
_SECTION_BEGIN("MAD");
T=80;
KMA=((C-MA(C,T))/MA(C,T))*100;
Graph0=KMA;
Graph0BarColor=IIf(KMA>0,5,4);
cx=Param("cxposn",810,0,1200,1);
cy=Param("cyposn",37,0,1000,1);
GfxSetBkColor(ColorRGB(200,50,100));
GfxSelectFont( "Bodoni MT",22,98, False);
GfxSetTextColor( colorYellow);
GfxTextOut("LTP. "+C+" ", cx, cy );
_SECTION_END();
_SECTION_BEGIN("Name");
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/20);
GfxSetTextAlign( 6 );
GfxSetTextColor( ColorHSB( 10, 300, 20 ) );
GfxSetBkMode(0);
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/20 );
_SECTION_BEGIN("Time Left");
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
x=Param("xposn",300,0,1000,1);
y=Param("yposn",50,0,1000,1);
GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 223, 100, 230 ), 3 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
//Say( "New period" );
}
GfxRoundRect( x+135, y+538, x+265, y+512, 0,0 );
GfxSetBkMode(1);
GfxSelectFont( "Arial", 14, 800, False );
GfxSetTextColor( colorBlack );
GfxTextOut( "Timeleft"+" : "+NumToStr( SecsToGo, 1.0 ), x+200, y+515 );
_SECTION_END();
_SECTION_END();
_SECTION_BEGIN("mo");
mo();
_SECTION_END();
_SECTION_BEGIN("BS-Text");
ABC=SS_C1();
CD=SS_C2();
AA = SS_A1();
BB = SS_B1();
pos = 4.9*ATR(5);
for( i = 0; i < BarCount; i++ ) {
if( ABC[i] ) PlotText( "BUY * STOCKXRAY @\n" +AA[i], i, Low[i] - pos[i], colorAqua, Offset=-10 );
if( CD[i] ) PlotText( "SELL * STOCKXRAY @\n" + BB[i], i, Low[i] + pos[i], colorRose, Offset=-10 );
}
_SECTION_END();
_SECTION_BEGIN("ADX");
range = Param("ADX Periods", 7, 2, 200, 1 );
Col_adx = IIf(ADX(range) > Ref(ADX(range),-1) AND ADX(range) > 20,colorBlue, colorGrey40);
em = Param("EMA Of ADX",3,1,20,1);
p = EMA(PDI(range),em);
m = EMA(MDI(range),em);
//Plot( ADX(range), _DEFAULT_NAME(), Col_adx , ParamStyle("ADX style", styleThick ) );
btp = BBandTop( P, 5, 0.4 );
bbp = BBandBot( P, 5, 0.4 );
btm = BBandTop( m, 5, 0.4 );
bbm = BBandBot( m, 5, 0.4 );
//Plot(btp , "" , colorDarkGreen, styleDashed );
//Plot(bbp , "" , colorDarkGreen, styleDashed );
//Plot( btm, "" , colorDarkRed, styleDashed );
//Plot( bbm, "" , colorDarkRed, styleDashed );
Col_p = IIf(p > btp, colorBrightGreen,colorDarkGreen);
Col_m = IIf(m > btm,colorRed,colorDarkRed);
//Plot( p, "+DI", Col_p, styleDots );
//Plot( M, "-DI", Col_m, styleDots );
Buy = ADX(range) > MDI(range) AND PDI(range) > MDI(range);
Sell = ADX(range) > PDI(range) AND MDI(range) > PDI(range);
Buy_sell = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));
trend = IIf(col_p==colorBrightGreen,colorBrightGreen,IIf(c ol_m==colorRed,colorRed,IIf(PDI(range) > MDI(range),colorDarkGreen,colorDarkRed)));
//Plot(6, "", Buy_sell, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();
_SECTION_BEGIN("B");
SetChartBkColor(colorPaleBlue);
Buy_p = p > btp OR m < bbm;
Buy_p1 =p > btp AND m < bbm;
Sell_m = m > btm OR p < bbp;
Sell_m1 = m > btm AND p < bbp;
bs = IIf(O>bb,colorBrightGreen,IIf(O<aa,colorRed,IIf(Bu y_p AND Sell_m,colorWhite,IIf(Buy_p,colorBlue,IIf(Sell_m,c olorPink,colorBlack)))));
HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose,"" , bs, styleCandle| styleNoLabel );
_SECTION_END();
_SECTION_BEGIN("MSG");
SS_Mo();
E30 = SS_E1();
F30 = SS_E2();
GO=(CD+(E30*0.0038));
JO=(ABC-(E30*0.0038));
so=(CD+(E30*0.0055));
PO=(ABC-(E30*0.0055));
ABC=SS_C1();
CD=SS_C2();
messageboard = ParamToggle("","",0);
exitlong = CD;
exitshort = ABC;
BT1 = SS_BT1();
BT2 = SS_BT2();
BT3 = SS_BT3();
BT4 = SS_BT4();
ST1 = SS_ST1();
ST2 = SS_ST2();
ST3 = SS_ST3();
ST4 = SS_ST4();
for(i=BarCount-1;i>1;i--)
{
if(ABC[i] == 1)
{
BT11 = BT1[i];
BT22 = BT2[i];
BT33 = BT3[i];
BT44 = BT4[i];
entry = AA[i];
sig = "ABC";
tar1 = BT11;
tar2 = BT22;
tar3 = BT33;
tar4 = BT44;
bars = i;
i = 0;
}
if(CD[i] == 1)
{
sig = "CD";
ST11 = ST1[i];
ST22 = ST2[i];
ST33 = ST3[i];
ST44 = ST4[i];
entry = BB[i];
tar1 = ST11;
tar2 = ST22;
tar3 = ST33;
tar4 = ST44;
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "ABC", colorBlue,colorDarkRed);
Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "", Clr, styleLine, Null, Null, Offset);
for (i=bars; i <BarCount;i++)
{
//PlotText(""+sig+"@"+entry, BarCount+4,entry,Null,colorBlue);
PlotText("T1*"+tar1,BarCount+4,tar1,Null,Clr);
PlotText("T2* "+tar2,BarCount+4,tar2,Null,Clr);
PlotText ("LT1* "+tar3,BarCount+4,tar3,Null,Clr);
PlotText ("LT2* "+tar4,BarCount+4,tar4,Null,Clr);
}
printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + " (" + WriteVal(IIf(sig == "CD",entry-C,C-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "ABC",(C-entry),(entry-C)),2.2));
if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 10, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
if ( sig =="ABC")
{
GfxSelectSolidBrush( colorBlue );
}
else
{
GfxSelectSolidBrush( colorRed );
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 3;
x2 = 210;
y = pxHeight;
GfxSelectPen( colorWhite, 5);
GfxRoundRect( x, y - 180, x2, y -1, 80, 150 ) ;
GfxTextOut( ( " * STOCKXRAY MAGIC * "),101,y-173);
GfxSetTextColor(ColorRGB(100,300,200));
GfxTextOut( (" STOP LOSS : " + WriteVal(IIf(sig == "ABC",(E30-SO),(E30-PO)),2.1)), 90, y-117);;
GfxTextOut( (" SECURED SL # REVERSE TREND "), 105, y-100);
GfxSetTextColor( colorWhite );
GfxTextOut( ("TGT:1 : " + tar1), 101, y -82);
GfxTextOut( ("TGT:2 : " + tar2), 100,y-62);
GfxSetTextColor( colorGold );
GfxTextOut( ("LONG TGT 1 : " + tar3), 100,y-43);
GfxTextOut( ("LONG TGT 2 : " + tar4), 100,y-24);
GfxSetTextColor( colorBrightGreen );
GfxTextOut( (" CURRENT P/L : " + WriteVal(IIf(sig == "ABC",(C-entry),(entry-C)),2.1)), 90, y-155);
GfxSelectFont("Tahomabold", 10.4, 100 );
GfxSetTextColor(ColorHSB(30,4,250));
GfxTextOut( (" BEST OPPORTUNITY * " + WriteVal(IIf(sig == "ABC",(E30-GO),(E30-JO)),2.1)), 103, y-135);;
GfxSetTextColor(ColorRGB(10,250,250));
GfxTextOut( ( " Develop By "),950,y-40);
GfxSetTextColor(ColorRGB(10,250,250));
GfxTextOut( ( "* STOCKXRAY SYSTEM * "),950,y-20);
}
_SECTION_BEGIN("Breakout");
breakout = ParamToggle("BREKOUT","No|Yes",1);
PP1 = SS_PP1();
PPA1 = SS_PPA1();
PP2 = SS_PP2();
PPA2 = SS_PPA2();
Asd=IIf(breakout,PPA1,PPA2);
Lkj=IIf(breakout,PP1,PP2);
Plot(IIf(breakout,PPA1,PPA2),"Best Up",colorBlack,4+8+2048);
Plot(IIf(breakout,PP1,PP2),"Best Dn",colorBlack,4+8+2048);
_SECTION_END();
_SECTION_END();
//Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorPink ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
_SECTION_BEGIN("zone");
TimeFrameSet(60*in1Minute);
//SS_Z1
st = SS_Z1();
TimeFrameRestore(); // restore time frame to original
uptrendf=TimeFrameExpand(st , 60*in1Minute);
//downtrendf=TimeFrameExpand( downtrend, 15*in1Minute);
Colorf=TimeFrameExpand (colorGold, 60*in1Minute);
Plot( 2, "zone",IIf(O>uptrendf,colorBrightGreen,colorRed),s tyleOwnScale|styleArea|styleNoLabel,1, 100,1);
_SECTION_END();
_SECTION_BEGIN("93");
ORBHigh = SS_Z2();
ORBLow = SS_Z3();
yy=Cross(f30,ORBHigh);
tt=Cross(ORBLow,f30);
PlotShapes(shapeStar*yy,colorWhite,0,O,-20);
PlotShapes(shapeStar*tt,colorBlack,0,O,20);
ww=Cross(f30,tar2);
qq=Cross(tar2,f30);
PlotShapes(shapeHollowStar*ww,colorDarkBlue,0,L,-20);
PlotShapes(shapeHollowStar*qq,colorViolet,0,H,20);
_SECTION_END();
_SECTION_BEGIN("Volume");
cx = Param("cxposn",1000,0,1200,1);
cy = Param("cyposn", 6,0,1000,10 );
GfxSelectFont( " Arial ", 18, 98, False );
GfxSetTextColor( colorWhite );
GfxTextOut("Volume " +Volume+ "", cx-300,cy +555);
_SECTION_END();
_SECTION_BEGIN("Title");
DDayO = TimeFrameGetPrice("O", inDaily);
DHiDay = TimeFrameGetPrice("H", inDaily);
DLoDay = TimeFrameGetPrice("L", inDaily);
prvC = TimeFrameGetPrice("C", inDaily, -1);//close
Title = EncodeColor(ColorRGB(10,10,350))+"* STOCKXRAY * "+EncodeColor(colorWhite)+ Name() + ", " + Interval(2) + ", " + Date() +
EncodeColor(colorBrightGreen) + "\nO " + EncodeColor(colorBrightGreen) + O +
", H : " + H +
", L : " + L+ EncodeColor(colorOrange) +
" ~ Prev Close : " + EncodeColor(colorPink) + prvC +EncodeColor(colorGold)+
"\n Day-Open : " +DDayO + " Day-High : " +DHiDay + " Day-Low : "+ DLoDay ;
_SECTION_END();
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
//Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("HA");
a=20;
GraphXSpace=5;
p=30;
//p = Param("p",30,2,100,1);
Om=DEMA(O,p);
hm=DEMA(H,p);
lm=DEMA(L,p);
Cm=DEMA(C,p);
HACLOSE=(Om+Hm+Lm+Cm)/4;
HaOpen = AMA( Ref( HaClose, -1), 1);
HaHigh = Max( Hm, Max( HaClose, HaOpen ) );
HaLow = Min( Lm, Min( HaClose, HaOpen ) );
slope = Param("slope",2,2,100,1);
Color20= IIf(LinRegSlope(MA(HaClose,a),slope)<0,colorRed,colorBlue);
Color=IIf(Haclose>MA(HaClose,a),colorBlue, colorRed);
PlotOHLC( HaOpen, HaOpen, HaClose, HaClose, "" + Name(), color, styleCandle);
mycfly5=IIf(Haclose>MA(HaClose,a),colorBlue,
IIf(Haclose<MA(HaClose,a),colorRed,31));
Plot(3, "", mycfly5, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();
_SECTION_BEGIN("HA 10min");
tf=Param("Time Frame (min)",10,1,10,1);tfrm=in1Minute*tf;
TimeFrameSet(tfrm);
a2=20;
p2=30;
//p2 = Param("p2",30,2,100,1);
Om2=DEMA(O,p2);
hm2=DEMA(H,p2);
lm2=DEMA(L,p2);
Cm2=DEMA(C,p2);
HACLOSE2=(Om2+Hm2+Lm2+Cm2)/4;
HaOpen2 = AMA( Ref( HaClose2, -1), 1);
HaHigh2 = Max( Hm2, Max( HaClose2, HaOpen2 ) );
HaLow2 = Min( Lm2, Min( HaClose2, HaOpen2 ) );
slope2 = Param("slope",2,2,100,1);
Color= IIf(LinRegSlope(MA(HaClose2,a2),slope2)<0,colorRed,colorBlue);
TimeFrameRestore();
a2f = TimeFrameExpand(a2, tfrm);
HaOpen2f = TimeFrameExpand(HaOpen2, tfrm);
HaHigh2f = TimeFrameExpand(HaHigh2, tfrm);
HaLow2f = TimeFrameExpand(HaLow2, tfrm);
Haclose2f = TimeFrameExpand(Haclose2, tfrm);
Color2=IIf(Haclose2f>MA(HaClose2f,a2f),colorSkyblue, colorPink);
//PlotOHLC( HaOpen2f, HaOpen2f, HaClose2f, HaClose2f, "" + Name(), color2, styleCandle);
mycfly10=IIf(Haclose2f>MA(HaClose2f,a2f),colorBlue,
IIf(Haclose2f<MA(HaClose2f,a2f),colorRed,31));
Plot(9, "", mycfly10, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();