Simple Coding Help - No Promise.

Well, then it's very easy...

Code:
function Kx(P,t,Kp)
{return k=MA((100*(P-LLV(L,t)))/(HHV(H,t)-LLV(L,t)),kp);}

t=Param("K period",8,1,1000,1);
Kp=Param("%K Smth",3,1,1000,1);

ko = Kx(o,t,Kp);
kh = Kx(h,t,Kp);
kl = Kx(l,t,Kp);
kc = Kx(c,t,Kp);

PlotOHLC(ko,kh,kl,kc,"%K OHLC",colorBlack,stylecandle );
Very Thanks for help Bro.
May it be easy for you, but near impossible for me..
:) :clap:
-tk
 

hmp

Well-Known Member
Hi
I would like to have afl for adx with 14 period and gives signal when falls below 25.Also do scanning for stocks whose adx falls below 25.
Experts pl. help.
Thanks & regards
 
can any one add backtest and exploration in below afl

_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);

Buy=Cover= Cross(Haclose,MA(HaClose,a));
Sell=Short= Cross(MA(HaClose,a),Haclose);

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);

_SECTION_END();


_SECTION_BEGIN("KPL Swing with N&M Swing");
SetBarsRequired(200,0);

GraphXSpace = 5;
SetChartOptions(0,chartShowArrows|chartShowDates);
k = Optimize("K",Param("K",3,0.25,5,0.25),0.25,5,0.25);
Per= Optimize("atr",Param("atr",10,3,20,1),3,20,1);
HACLOSE=(O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
j=Haclose;

// set background gradient colours
SetChartBkGradientFill( ParamColor("BgTop", colorDarkGrey),ParamColor("BgBottom", colorLightGrey ),ParamColor("titleblock",colorWhite));
GraphXSpace = 5;

//=======================================================================================================================
//=========================Indicator==============================================================================================
f=ATR(15);

rfsctor = WMA(H-L, Per);

revers = k * rfsctor;

Trend = 1;
NW[0] = 0;
NW[BarCount-1] = Null;


for(i = 1; i < BarCount-1; i++)
{
if(Trend[i-1] == 1)
{
if(j < NW[i-1])
{
Trend = -1;
NW = j + Revers;
}
else
{
Trend = 1;
if((j - Revers) > NW[i-1])
{
NW = j - Revers;
}
else
{
NW = NW[i-1];
}
}
}
if(Trend[i-1] == -1)
{
if(j > NW[i-1])
{
Trend = 1;
NW = j - Revers;
}
else
{
Trend = -1;
if((j + Revers) < NW[i-1])
{
NW = j + Revers;
}
else
{
NW = NW[i-1];
}
}
}
}

//===============system================

//Plot(NW, "", IIf(Trend == 1, 27, 4), 4);
//Buy=NW<HACLOSE;
//Sell=NW>HACLOSE;
//SellPrice=ValueWhen(Sell,C,1);
//BuyPrice=ValueWhen(Buy,C,1);
//Buy=ExRem(Buy,Sell);
//Sell=ExRem(Sell,Buy );

//Short=Sell;
//Cover=Buy;


//NMAB= NW<HACLOSE;
//NMAS= NW>HACLOSE;
AlertIf( Buy, "SOUND C:\\Windows\\Media\\buy.wav", "Audio alert", 1,1+1 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\sell.wav", "Audio alert", 2,1+1 );

//NMA_status= WriteIf(NMAB, "BUY MODE", WriteIf(NMAS, "SELL MODE", "NEUTRAL"));
//NMAS_Col=IIf(NMAB, colorGreen, IIf(NMAS, colorRed, colorLightGrey));
Filter=1;
//AddColumn( NW[BarCount-1], "SAR", 1.2 );
//AddColumn( HACLOSE, "HA Close", 1.2 );
//AddColumn( C, "Close", 1.2 );
//AddTextColumn(NMA_status, "MODE", 1, colorWhite, NMAS_Col);
//AddColumn( DateTime(), "Date / Time", formatDateTime );
_SECTION_END();

_SECTION_BEGIN("Title");
if( Status("action") == actionIndicator )
(
Title = EncodeColor(colorBlack)+ " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorBlack) +
" - " + Date() +" - "+"\n" +EncodeColor(colorBlack) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-"+L+" "+
"Cl-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+
EncodeColor(colorLime)+
WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+
WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(colorWhite)+
WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"",""));
//WriteIf(Long AND NOT Buy, "Trade : Long - Entry price Rs."+(BuyPrice),"")+
//WriteIf(shrt AND NOT Sell, "Trade : Short - Entry price Rs."+(SellPrice),"")+"\n"+
//WriteIf(Long AND NOT Buy, "Current Profit/Loss Rs."+(C-BuyPrice)+"","")+
//WriteIf(shrt AND NOT Sell, "Current Profit/Loss Rs."+(SellPrice-C)+"",""));
//PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
//PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
//PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
//PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
//PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
//PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);

GraphXSpace=5;


for(i=BarCount-1;i>1;i--)
{
if(Buy == 1)
{
entry = C;
sig = "BUY";
sl = Ref(NW,-1);
tar1 = entry + (entry * .0050);
tar2 = entry + (entry * .0092);
tar3 = entry + (entry * .0179);

bars = i;
i = 0;
}
if(Sell == 1)
{
sig = "SELL";
entry = C;
sl = Ref(NW,-1);
tar1 = entry - (entry * .0060);
tar2 = entry - (entry * .0120);
tar3 = entry - (entry * .0220);


bars = i;
i = 0;
}
}
Offset = 20;
//Clr = IIf(sig == "BUY", colorLime, colorRed);
//ssl = IIf(bars == BarCount-1, NW[BarCount-1], Ref(NW, -1));
//sl = ssl[BarCount-1];

//Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
//Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
//Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset);



messageboard = ParamToggle("Message Board","Show|Hide",1);
if (messageboard == 1 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );

if ( sig =="BUY")
{
GfxSelectSolidBrush( colorDarkGreen ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorDarkRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 290;

y = pxHeight;

GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;
GfxTextOut( (" Amibroker trading System "),33,y-165);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("" + WriteIf(sig =="Long",sig + " at ",sig + " @") + " : " + entry), 13, y-120);
//GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 13, y-100);
//GfxTextOut( ("TGT:1 : " + tar1), 13, y -80);
//GfxTextOut( ("TGT:2 : " + tar2), 13,y-60);
//GfxTextOut( ("TGT:3 : " + tar3), 13,y-40);
GfxTextOut( ("Current Profit : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)+" Points"), 13, y-100);;

}
_SECTION_END();




_SECTION_BEGIN("Background text");
C11=ParamColor("up panel",colorBlack );
C12=ParamColor("dn panel",colorBlack );
C13=Param("fonts",20,10,30,1 );
C14=Param("left-right",2.1,1.0,5.0,0.1 );
C15=Param("up-down",8,1,30,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode( 0 );
GfxSelectFont("Tahoma", 12, 500, False, False, 0);
GfxSetTextColor(colorCustom12);
GfxSetTextAlign( 6 );
GfxSelectFont("Tahoma", 15, 600, False, False, 0);
GfxSetTextColor(colorWhite);
GfxSetTextAlign( 6 );
GfxTextOut( "LTP "+WriteVal(C,1.2), Status("pxwidth")/C14, Status("pxheight")/C15);
GfxSelectFont("Tahoma", 12, 400, False, False, 0);
GfxSetTextColor(colorBrightGreen);
GfxSelectFont("Tahoma", 12, 400, False, False, 0);
GfxSetTextColor(colorRed);
GfxSelectFont("Tahoma", 12, 400, False, False, 0);
GfxSetTextColor(colorYellow);
GfxSelectFont("Tahoma", 12, 400, False, False, 0);
GfxSetTextColor(colorGreen);

pricechange=(C-Ref(C,-1))*100/Ref(C,-1);
changeponit=C-Ref(C,-1);
Vlp=Param("Volume lookback period",15,10,300,10);
Vrg=MA(V,Vlp);
St = StDev(Vrg,Vlp);
Vp3 = Vrg + 3*st;
Vp2 = Vrg + 2*st;;
Vp1 = Vrg + 1*st;;
Vn1 = Vrg -1*st;
Vn2 = Vrg -2*st;

x=Param("xposn",1,0,1000,1);
y=Param("yposn",1,0,1000,1);

GfxGradientRect( 1, 1, 1400, 40, colorGrey50, colorDarkGrey);
GfxSetBkMode(0);
GfxSelectFont( "Tahoma", 16, 800, False );
GfxSetTextColor( colorGold );
GfxTextOut( Name(), x+100, y+10 );
GfxSelectFont( "Century Gothic", 15, 100, False );
GfxSetTextColor( colorWhite );
GfxTextOut( Date(), x+600, y+10 );
GfxSelectFont( "Comic Sans MS", 15, 500, False );
GfxSetTextColor( colorYellow );
GfxTextOut( Interval(2), x+275, y+10 );
GfxSelectFont( "Georgia", 18, 800, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Amibroker Trading System ", x+1000, y+10 );

//------------------------------------------------------------ H, L, O, C----------------------
GfxGradientRect( 1, 40, 1400, 55, colorGrey50, colorDarkGrey );
GfxSetBkMode(0);
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Open:"+WriteVal(O,1.2), x+100, y+40 );
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "High:"+WriteVal(H,1.2), x+200, y+40 );
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Low:"+WriteVal(L,1.2), x+300, y+40 );
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Close:"+WriteVal(C,1.2), x+400, y+40 );
GfxSelectFont( "Script MT Bold", 12, 100, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "By Amibroker Trading System ", x+1000, y+39 );
//-----------------------------------------------------------Valume-------------------------------
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Volume="+WriteVal(V,1.2), x+500, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorLime );
GfxTextOut( WriteIf(V>Vp2,"Very High",""), x+600, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorLime );
GfxTextOut( WriteIf(V>Vp1," High",""), x+600, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorLime );
GfxTextOut( WriteIf(V>Vrg,"Above Average",""), x+600, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorRed );
GfxTextOut( WriteIf(V<Vrg AND V>Vn1,"Less than Average",""), x+600, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorRed );
GfxTextOut( WriteIf(V<Vn1,"Low",""), x+600, y+40 );
 

extremist

Well-Known Member
pls wating for help in this afl
And we r waiting when u r going to use the facilities given in this forum.

People always post copy paste codes which r generally very lengthy.
It makes thread untidy.

Please use Code Tag for posting Code.
the procedure is just explained before few posts.


But for lazy people like u posting the link again

http://www.traderji.com/amibroker/90119-simple-coding-help-no-promise-84.html#post1076971
Please members co operate and use this thing.

it keeps the thread in shape and pleasant to read for the new visitor.

I hope u all understand...

Behave Like a responsible member of this forum.
 
Last edited:
can u correct this formula for me. PLZ>


_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 ) PlotText( "BUY * STOCKXRAY @\n" +AA, i, Low - pos, colorAqua, Offset=-10 );

if( CD ) PlotText( "SELL * STOCKXRAY @\n" + BB, i, Low + pos, 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(col_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(Buy_p AND Sell_m,colorWhite,IIf(Buy_p,colorBlue,IIf(Sell_m,colorPink,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 == 1)
{
BT11 = BT1;
BT22 = BT2;
BT33 = BT3;
BT44 = BT4;
entry = AA;
sig = "ABC";

tar1 = BT11;
tar2 = BT22;
tar3 = BT33;
tar4 = BT44;

bars = i;
i = 0;
}
if(CD == 1)
{
sig = "CD";


ST11 = ST1;
ST22 = ST2;
ST33 = ST3;
ST44 = ST4;
entry = BB;

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),styleOwnScale|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();
 

Similar threads