Require LiveSignal AFL... Can Anyone help me..

#1
I found this online..

And they are selling this AFL for very high monthly charges.

They own the same website and selling via L I V e s I g n a l . I

So thought if all seniors and other eminent people can help get the AFL code for this one.

I have also attached the picture for better understanding of this AFL Code.


waiting for the code which would help me and also many others ....


Thank you,
Kumar
 
Last edited:

sr114

Well-Known Member
#2
Live in Signal afl- modified form - chart image



the afl is
_SECTION_BEGIN("Background_Setting - ");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorGrey40));
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
SetChartOptions(0,chartShowArrows|chartShowDates);
grid_day = IIf(Day()!=Ref(Day(),-1),1,0);
//Plot(grid_day,"",31,styleHistogram|styleDots|styleNoLabel|styleOwnScale);
_SECTION_END();

_SECTION_BEGIN("RMO");
SwingTrd1 = 100 * (Close - ((MA(C,2)+
MA(MA(C,2),2)+
MA(MA(MA(C,2),2),2) +
MA(MA(MA(MA(C,2),2),2),2) +
MA(MA(MA(MA(MA(C,2),2),2),2),2) +
MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2) +
MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2), 2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2), 2),2),2),2))/10))/(HHV(C,10)-LLV(C,10));

SwingTrd2=EMA(SwingTrd1,30);
SwingTrd3=EMA(SwingTrd2,30);

RMO= EMA(SwingTrd1,81);

Buy=Cross(SwingTrd2,SwingTrd3);
Sell=Cross(SwingTrd3,SwingTrd2);

Buyval=ValueWhen(Buy,H,1);
Sellval=ValueWhen(Sell,L,1);


Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

Bull_Trend=EMA(SwingTrd1,81)>0;
Bear_Trend=EMA(SwingTrd1,81)<0;

Ribbon_kol=IIf(Bull_Trend,colorLime, IIf(Bear_Trend,colorRed, colorGrey40));
//Plot(2, "ribbon", Ribbon_kol, styleOwnScale|styleArea|styleNoLabel, -0.5,100);

Impulse_UP= EMA(SwingTrd1,30) > 0;
Impulse_Down= EMA(SwingTrd1,81) < 0;

bar_kol=IIf(impulse_UP, colorSkyblue, IIf(impulse_Down, colorOrange,IIf(Bull_Trend, colorGreen, colorRed)));

Plot(Close,"Close",bar_kol,styleBar | styleThick );
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorLime, colorRed ),0, IIf( Buy, Low, High ) );
_SECTION_END();

_SECTION_BEGIN("days hi lo");
//.....................................................
Today = LastValue(Day());
OpDay = TimeFrameGetPrice("O", inDaily);
HiDay = TimeFrameGetPrice("H", inDaily);
LoDay = TimeFrameGetPrice("L", inDaily);

//Plot(HiDay ,"",colorRed,styleLine); // ,styleOwnScale);
//Plot(LoDay ,"",colorBrightGreen,styleLine); // , styleOwnScale);

Rng=Hiday-Loday;

_SECTION_END();

_SECTION_BEGIN("title ");
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1.0 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}

Title =
EncodeColor(colorWhite)+ "Live In Signal clone afl " + " \n " + Name() + " | " + EncodeColor(colorBrightGreen)
+ EncodeColor(colorBrightGreen) + Date() +" | "
+"\n"+EncodeColor(10) +"Op ="+O +","+" Hi ="+H +" ,"+" Lo ="+L +","+ " Cls ="+C + " \n Volume : "+ WriteVal(V,1.0)+"\n \n"
+EncodeColor(colorBrightGreen) + "Day's Range = Rs." + EncodeColor(colorBrightGreen) + StrToNum(NumToStr((HiDay - LoDay), 1.2))+ "\n \n"
+EncodeColor(colorWhite) + "Day's Op = Rs." + EncodeColor(colorWhite) + Opday + "\n"
+EncodeColor(colorWhite) + "Day's Hi = Rs." + EncodeColor(colorWhite) + Hiday + "\n"
+EncodeColor(colorWhite) + "Day's Lo = Rs." + EncodeColor(colorWhite) + Loday + "\n" + "\n";


_SECTION_END();

_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, [email protected]//
FS=Param("Font Size",28,11,100,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorViolet) );
Hor=Param("Horizontal Position",766,1,1200,1);
Ver=Param("Vertical Position",1,1,1,1);
GfxTextOut("Cls : "+C,Hor , Ver );

YC=TimeFrameGetPrice("C",inDaily,-1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
DD=Prec(C-YC,2);
xx=abs(Prec((DD/YC)*100,2));
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorViolet) );
//GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+20 );
_SECTION_END();
rgds
subroto
 
Last edited:
#4
Live in Signal afl- modified form - chart image



the afl is


rgds
subroto
Thank you very much MR.Subroto for the AFL.

but i have a doubt .. why are they three colour.. i understand red for down trend and green for up trend.. didnt understand what the third colour stands for.

If you dont mind can you explain me clearly as wat do the the three different colours stand for.,,
 
Last edited:
#5
This is the AFL U R Looking For.
:thumb:
Thank you very much Mr.Uday deep.

Firstly thanks for the AFL

and secondly was the very quick and fast reply...

But i need to ask you One More Thing.

Can we get an alert for this AFL.... which gives the results in alert output window.


Thanks once Again !!!!
 

sr114

Well-Known Member
#6
Thank you very much MR.Subroto for the AFL.

but i have a doubt .. why are they three colour.. i understand red for down trend and green for up trend.. didnt understand what the third colour stands for.

If you dont mind can you explain me clearly as wat do the the three different colours stand for.,,
following is the color convention used for the bar color

bar_kol :
IIf(impulse_UP, colorSkyblue, // when impulse is up - coor is sky blue
IIf(impulse_Down, colorOrange, // whrn impulse is down - color is orange
IIf(Bull_Trend, colorGreen, colorGrey40))); // when bull tren - color is green and bear trend color is grey40

if u have problem in the multi color convention then u can use the bar color for only impulse up and impulse down

the code will be

bar_kol=IIf(impulse_UP, colorSkyblue, IIf(impulse_Down, colorOrange,colorGrey40));
this line of code is used as

//bar_kol=IIf(impulse_UP, colorSkyblue, IIf(impulse_Down, colorOrange,IIf(Bull_Trend, colorGreen, colorGrey40))); // replace this line of code by the below code

bar_kol=IIf(impulse_UP, colorSkyblue, IIf(impulse_Down, colorOrange,colorGrey40));
rgds
subroto
 
#7
following is the color convention used for the bar color

bar_kol :
IIf(impulse_UP, colorSkyblue, // when impulse is up - coor is sky blue
IIf(impulse_Down, colorOrange, // whrn impulse is down - color is orange
IIf(Bull_Trend, colorGreen, colorGrey40))); // when bull tren - color is green and bear trend color is grey40

if u have problem in the multi color convention then u can use the bar color for only impulse up and impulse down

the code will be



this line of code is used as



rgds
subroto

Thank u Veru much Subroto... To me convenience i used the follow colours and the code

bar_kol=IIf(impulse_UP, colorBlue, IIf(impulse_Down, colorRed,IIf(Bull_Trend, colorGreen, colorRed)));

I have used Blue for SkyBlue and Red for Orange ...


Bull Trend is is Green itself.. understood that part

But not sure of the which colour for Bear Trend . I changed it to yellow colour.. but in the chart that color is not arriving ( not sure why )


Hope this is correct code and colouring...
 
Last edited:
#8
Hello kumar,

Try this for Target and stoploss in the above afl.


Code below :-




Len1 = Optimize("Len1", 2, 2, 11, 1);
Len2 = Optimize("Len2", 10, 2, 21, 1);
Len3 = Optimize("Len3", 30, 2, 50, 1);
Len4 = 81;

//Indicators
MAz = Cum(0); //I believe MAz = 0; would be same as well.
MAy = C;
for (i = 1; i <= Len2; i++)
{
MAy = MA(MAy, Len1);
MAz = MAz + MAy;
}

STzero = IIf(HHV(C, Len2) - LLV(C, Len2)==0 ,0.00001,HHV(C, Len2) - LLV(C, Len2)); //just to avoid dividing be zero


SwingTrd1 =100 * ((C - (MAz / Len2)) / STzero);
SwingTrd2=
EMA(SwingTrd1,Len3 );
SwingTrd3=
EMA(SwingTrd2,Len3 );
RMO= EMA(SwingTrd1,Len4 );
Buy=Cross(SwingTrd2,SwingTrd3);
Sell=Cross(SwingTrd3,SwingTrd2);
Bull_Trend=EMA(SwingTrd1,Len4)>0;
Bear_Trend=EMA(SwingTrd1,Len4)<0;
Ribbon_kol=IIf(Bull_Trend,colorGreen, IIf(Bear_Trend,colorRed, colorBlack));
Plot(3, "ribbon", Ribbon_kol, styleOwnScale|styleArea|styleNoLabel, -0.5,100);
Impulse_UP= EMA(SwingTrd1,Len3 ) > 0;
Impulse_Down= EMA(SwingTrd1,Len4) < 0;
bar_kol=IIf(impulse_UP, colorBlue, IIf(impulse_Down, colorRed,IIf(Bull_Trend, colorRed, colorBlue)));
Plot(Close,"Close",bar_kol,styleBar | styleThick );
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBlue, colorRed ),0, IIf( Buy, Low, High ) );
//pos = IIf(SwingTrd2>Ref(SwingTrd2,-1),colorBrightGreen,IIf(SwingTrd2<Ref(SwingTrd2,-1),colorRed,colorLightGrey));
//Plot(6,"",pos,styleArea | styleOwnScale | styleNoLabel, 0, 100 );

_SECTION_END();


//RMO EXPLORATIONS - INTRADAY
_SECTION_BEGIN("RMO Explorer");

New_Bullish = IIf(RMO > 0 AND Ref(RMO, -1) <= 0,1,0);
New_Bearish = IIf(RMO < 0 AND Ref(RMO, -1) >= 0,1,0);
New_Buy_Arrow = IIf(Cross(SwingTrd2,SwingTrd3),1,0) AND RMO >0;
New_Sell_Arrow = IIf(Cross(SwingTrd3,SwingTrd2),1,0) AND RMO <0;
New_Blue_Bar = IIf(Cross(SwingTrd2,0),1,0) AND RMO >0;
New_Red_Bar = IIf(Cross(0,SwingTrd2),1,0) AND RMO <0;
Old_Bullish = IIf(RMO > 0 AND Ref(RMO, -1) > 0,1,0);
Old_Bearish = IIf(RMO < 0 AND Ref(RMO, -1) < 0,1,0);
New_Buy_Bar = IIf(Ref(New_Buy_Arrow,-1) AND C > Ref(H,-1), 1, 0);
New_Sell_Bar = IIf(Ref(New_Sell_Arrow,-1) AND C < Ref(L,-1), 1, 0);
P_Buy = (Ref(RMO,-1) > 0) AND (Ref(New_Blue_Bar,-1) > 0);
P_Sell= (Ref(RMO,-1) < 0) AND (Ref(New_Red_Bar,-1) > 0);
CBR = RMO;
CBS2= SwingTrd2;
CBS3= SwingTrd3;
PBR = Ref(RMO,-1);
PBS2= Ref(SwingTrd2,-1);
PBS3= Ref(SwingTrd3,-1);
New3CBuy = ((CBR > 0) AND (CBS2 >0) AND (CBS2 > CBS3) AND ((PBR <= 0) AND (PBS2 <=0) AND (PBS2 <= PBS3)));
New3CSell= ((CBR < 0) AND (CBS2 <0) AND (CBS2 < CBS3) AND ((PBR >= 0) AND (PBS2 >=0) AND (PBS2 >= PBS3)));
New_Arrow_New_Bar_Buy = ((CBR > 0) AND (CBS2 >0) AND (CBS2 > CBS3) AND ((PBS2 <=0) AND (PBS2 <= PBS3)));
New_Arrow_New_Bar_Sell= ((CBR < 0) AND (CBS2 <0) AND (CBS2 < CBS3) AND ((PBS2 >=0) AND (PBS2 >= PBS3)));
B1=New_Buy_Bar;
S1=New_Sell_Bar;
B2=New3CBuy;
S2=New3CSell;
B3=New_Buy_Arrow;
S3=New_Sell_Arrow;
B4=New_Buy_Arrow;
S4=New_Sell_Arrow;
B5=New_Blue_Bar;
S5=New_Red_Bar;
B6=New_Bullish;
S6=New_Bearish;
Buy= (B1 OR B2 OR B3 OR B4 OR B5 OR B6) ;
Sell= (S1 OR S2 OR S3 OR S4 OR S5 OR S6);
Filter=Buy OR Sell;
SetOption("NoDefaultColumns", True );
AddTextColumn(Name(),"Security",1.2,colorDefault,colorDefault,90);
AddColumn( DateTime(), "Date", formatDateTime, colorDefault,colorDefault,100);
AddColumn(IIf(B1,66,IIf(S1,83,32)),"New Trade Bar", formatChar, colorWhite, bkcolor =IIf(B1, colorGreen,IIf(S1,colorRed,colorDefault)));
AddColumn(IIf(B2,66,IIf(S2,83,32)),"New3C", formatChar, colorWhite, bkcolor =IIf(B2, colorGreen,IIf(S2,colorRed,colorDefault)));
AddColumn(IIf(B3,66,IIf(S3,83,32)),"New Arrow+Bar", formatChar, colorWhite, bkcolor =IIf(B3, colorGreen,IIf(S3,colorRed,colorDefault)));
AddColumn(IIf(B4,66,IIf(S4,83,32)),"New Arrow", formatChar, colorWhite, bkcolor =IIf(B4, colorGreen,IIf(S4,colorRed,colorDefault)));
AddColumn(IIf(B5,66,IIf(S5,83,32)),"New Bar", formatChar, colorWhite, bkcolor =IIf(B5, colorGreen,IIf(S5,colorRed,colorDefault)));
AddColumn(IIf(B6,66,IIf(S6,83,32)),"New RMO", formatChar, colorWhite, bkcolor =IIf(B6, colorGreen,IIf(S6,colorRed,colorDefault)));
AlertIf( Buy, "SOUND C:\\Windows\\Media\\chimes.wav", "Audio alert", 1, 1+8 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\ding.wav", "Audio alert", 2, 1+8 );
_SECTION_END();

Cover=Buy;
Short=Sell;

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );
no=Param( "Swing", 8, 1, 55 );
tsl_col=ParamColor( "Color", colorLightGrey );
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);

no = Optimize("TSL",Param("A (Change To Optimise)",10, 1, 55 ,1),1, 55 ,1);

tsl_col=ParamColor( "Color", colorLightGrey );
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
dtsl=IIf(avn==1,sup,res);
SellPrice=ValueWhen(Short,C,1);
BuyPrice=ValueWhen(Buy,C,1);
Long=Flip(Buy,Sell);
Shrt=Flip(Short,Cover);
Relax = NOT Long AND NOT Buy AND NOT shrt AND NOT Sell AND NOT Sell AND NOT Cover;
SellSL=ValueWhen(Short,DTSL,1);
BuySL=ValueWhen(Buy,DTSL,1);
BuyDifference= BuyPrice - BuySL;
SellDifference = SellSL - SellPrice;

tar1 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice + BuyDifference), (SellPrice - SellDifference));
tar2 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice + (2*BuyDifference)), (SellPrice - (2*SellDifference)));
tar3 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice + (4*BuyDifference)), (SellPrice - (4*SellDifference)));


CloseAtEnd = ParamToggle("Close Positions EOD", "No|Yes");
stopreverse =ParamToggle("Switch To Stop And Reverse","No|Yes",0);
Trend = ATR(21) < StDev (C,21);
Range = ATR(21) > StDev (C,21);
no=10;
C13=20;
C14=2.1;
C15=12;

tsl_col=ParamColor( "Color", colorLightGrey );
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
dtsl=IIf(avn==1,sup,res);

SellPrice=ValueWhen(Short,C,1);
BuyPrice=ValueWhen(Buy,C,1);
Long=Flip(Buy,Sell);
Shrt=Flip(Short,Cover);
Relax = NOT Long AND NOT Buy AND NOT shrt AND NOT Sell AND NOT Sell AND NOT Cover;
SellSL=ValueWhen(Short,DTSL,1);
BuySL=ValueWhen(Buy,DTSL,1);
BuyDifference= BuyPrice - BuySL;
SellDifference = SellSL - SellPrice;

tar1 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice + BuyDifference), (SellPrice - SellDifference));
tar2 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice + (2*BuyDifference)), (SellPrice - (2*SellDifference)));
tar3 = IIf(Buy OR Long AND NOT Relax AND NOT Sell AND NOT Cover, (BuyPrice + (4*BuyDifference)), (SellPrice - (4*SellDifference)));
buyach1 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt), H > tar1, 0);
buyach2 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt), H > tar2 , 0);
buyach3 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt), H > tar3, 0);

sellach1 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long), L < tar1 , 0);
sellach2 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long), L < tar2, 0);
sellach3 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long), L < tar3, 0);



//Settings for exploration

Filter=Buy OR Short;
AddColumn( IIf( Buy, 66 , 83 ), "Signal", formatChar, colorDefault, IIf( Buy , colorGreen, colorRed ) );
AddColumn(Close,"Entry Price",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(dtsl,"Stop Loss",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(tar1,"Target 1",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(tar2,"Target 2",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(tar3,"Target 3",1.4, colorDefault, IIf( Buy , colorGreen, colorRed ));
AddColumn(Volume,"Volume",1.0, colorDefault, IIf ((Volume > 1.25 * EMA( Volume, 34 )),colorBlue,colorYellow));




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

//Short = ExRem(Short, Cover);
//Cover = ExRem(Cover, Short);

GraphXSpace = 5;
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 280;

y = pxHeight;
dist = 2*ATR(10);
dist1 = 3*ATR(10);
i=BarCount;
bars = i;

messageboard = ParamToggle("Message Board","Show|Hide",1);
if(messageboard)
{
for( i = 0; i < BarCount; i++ )
{
if( Buy )
{
// PlotText( "\nBuy:" + L[ i ] + "\nT= " + (L*1.005) + "\nSL= " + (L*0.9975), i, L[ i ]-dist, colorGreen, colorWhite );

// Signal Display Panel //

SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,L[ i ]);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
BuyStop2 = L*0.9975;
BuyTP1 = L*1.070;
BuyTP2 = L*1.050;
BuyTP3 = L*1.035;
buyach1 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt), H > BuyTP3, 0);
buyach2 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt), H > BuyTP2, 0);
buyach3 = IIf((Buy OR Long AND NOT Relax AND NOT Cover AND NOT Short AND NOT Shrt), H > BuyTP1, 0);
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetOverlayMode( mode = 0 );
GfxSelectPen( colorBrightGreen, 3 );
GfxSelectSolidBrush( colorBrightGreen);
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;
GfxSetTextColor( colorGold );
GfxTextOut( ( " Trading System "),73,y-165);
GfxTextOut( (" "),27,y-160);
GfxSetBkMode(1);
GfxSelectFont( "Arial", 10, 700, False );
GfxSetTextColor( colorBlue );
GfxSetTextAlign(0);
GfxSelectFont( "Tahoma", 13, 100 );

GfxTextOut( WriteIf(L[ i ], "Buy Above: "+L[ i ],""), 13, y-140);
GfxSetTextColor( colorGold );
GfxTextOut( WriteIf(BuyStop2, "Long SL: "+(BuyStop2),""), 13, y-120);
GfxSetTextColor( colorWhite );
GfxTextOut( WriteIf(BuyTP1, "Buy TGT1: "+(BuyTP3),""), 13,y- 100);
GfxTextOut( WriteIf(BuyTP2, "Buy TGT2: "+(BuyTP2),""), 13,y- 80);
GfxTextOut( WriteIf(BuyTP3, "BuyTGT3: "+(BuyTP1),""), 13,y- 60);
GfxSetTextColor( colorViolet );
GfxTextOut( ("Current P/L : " + WriteVal(IIf(Buy ,(C-BuyPrice),(C-BuyPrice)),2.2)), 88, y-22);
GfxTextOut( ("Buy Signal came " + (BarCount-bars +1) * Interval()/2 + " mins ago"), 13, y-40) ;
GfxTextOut
( ("" + WriteIf (buyach1, " Done: "+BuyTP3,"")), 160, y-100);
GfxTextOut
( ("" + WriteIf (buyach2, " Done: "+BuyTP2,"")), 160, y-80);
GfxTextOut
( ("" + WriteIf (buyach3, " Done: "+BuyTP1,"")), 160, y-60);
// END of Signal Display Panel //
}
if( Sell )
{
// PlotText( "Sell:" + H[ i ] + "\nT= " + (H*0.995) + "\nSL= " + (H*1.0025), i, H[ i ]+dist1, colorRed, colorWhite );

// Signal Display Panel //
SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,H[ i ]);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
SellStop2 = H*1.0025;
SellTP1 = H*0.978;
SellTP2 = H*0.982;
SellTP3 = H*0.988;
sellach1 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long), L < SellTP3 , 0);
sellach2 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long), L < SellTP2, 0);
sellach3 = IIf((Short OR Shrt AND NOT Relax AND NOT Sell AND NOT Buy AND NOT Long), L < SellTP1, 0);

GfxSelectFont( "Tahoma", 13, 100 );
GfxSetOverlayMode( mode = 0 );
GfxSelectPen( colorRed, 3 );
GfxSelectSolidBrush( colorRed );
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;

GfxTextOut( (" "),27,y-160);
GfxSetBkMode(1);
GfxSelectFont( "Arial", 10, 700, False );
GfxSetTextColor( colorWhite );
GfxSetTextAlign(0);
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetTextColor( colorGold );
GfxTextOut( ( " Trading System "),73,y-165);
GfxSetTextColor( colorWhite );
GfxTextOut( WriteIf(H[ i ], "Sell Below: "+H[ i ],""), 13, y-140);
GfxSetTextColor( colorGold );
GfxTextOut( WriteIf(SellStop2, "Short SL: "+(SellStop2),""), 13, y-120);
GfxSetTextColor( colorBlue );
GfxTextOut( WriteIf(SellTP1, "Short TGT1: "+(SellTP3),""), 13, y-100);
GfxTextOut( WriteIf(SellTP2, "Short TGT2: "+(SellTP2),""), 13, y-80);
GfxTextOut( WriteIf(SellTP3, "Short TGT3: "+(SellTP1),""), 13, y-60);
GfxSetTextColor( colorGold );
GfxTextOut( ("Current P/L : " + WriteVal(IIf(Sell ,(SellPrice-C),(SellPrice-C)),2.2)), 88, y-22);
GfxTextOut( ("sell Signal came " + (BarCount-bars +1) * Interval()/2 + " mins ago"), 13, y-40) ;
GfxTextOut
( ("" + WriteIf (sellach1, " Done: "+SellTP3,"")), 160, y-100);
GfxTextOut
( ("" + WriteIf (sellach2, " Done: "+SellTP2,"")), 160, y-80);
GfxTextOut
( ("" + WriteIf (sellach3, " Done: "+SellTP1,"")), 160, y-60);
// END of Signal Display Panel //
}}}



Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy);

BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);


Edc=(
WriteIf (Buy AND Ref(shrt,-1), " BUY @ "+C+" ","")+
WriteIf (Sell AND Ref(Long,-1), " SEll @ "+C+" ","")+
WriteIf(Sell , "Last Trade Profit Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy , "Last Trade Profit Rs."+(SellPrice-C)+"",""));

//============== TITLE ==============
_SECTION_BEGIN("Title");
no=Param( "Swing", 6, 1, 55 );
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
dec = (Param("Decimals",2,0,7,1)/10)+1;
if( Status("action") == actionIndicator )
(
Title = EncodeColor(55)+ Title = Name() + " " + EncodeColor(32) + Date() +
" " + EncodeColor(5) + "{{INTERVAL}} " +
EncodeColor(55)+ " Open = "+ EncodeColor(52)+ WriteVal(O,dec) +
EncodeColor(55)+ " High = "+ EncodeColor(5) + WriteVal(H,dec) +
EncodeColor(55)+ " Low = "+ EncodeColor(32)+ WriteVal(L,dec) +
EncodeColor(55)+ " Close = "+ EncodeColor(52)+ WriteVal(C,dec)+
EncodeColor(55)+ " Volume = "+ EncodeColor(52)+ WriteVal (V ,1.25)




+"\n"+EncodeColor(colorBrightGreen)+

WriteIf (Buy , "Signal: Go Long - Entry Price: "+WriteVal(C)+" - Traget: "+WriteVal((BuyPrice-tsl)+BuyPrice)

+" - StopLoss:"+WriteVal(tsl)+" "

,"")+

"\n"+EncodeColor(colorRed)+
WriteIf (Sell , "Signal: Go Short - Entry Price: "+WriteVal(C)+" - Target: "+WriteVal((tsl-SellPrice)-SellPrice)+" - StopLoss:"+WriteVal(tsl)+" ","")+
EncodeColor(colorTurquoise)+
WriteIf(Long AND NOT Buy, "Trade: Long - Entry Price: "+WriteVal((BuyPrice))+" - Profit: "+WriteVal((C-BuyPrice))+" "+EncodeColor(colorLime)+"Let your profit runs!","")+
EncodeColor(colorLightOrange)+
WriteIf(shrt AND NOT Sell, "Trade: Short - Entry Price: "+WriteVal((SellPrice))+" - Profit: "+WriteVal((SellPrice-C))+" - "+EncodeColor(colorLime)+"Let your profit runs!","")


);
_SECTION_END();


if (messageboard == 0 )
{
if( Status("action") == actionIndicator )
(

Title = EncodeColor(55)+ Title = Name() +
" " + EncodeColor(5) + "{{INTERVAL}} " + EncodeColor(colorSkyblue) +
" " + Date() +" "+"\n" +EncodeColor(55) +"Open-"+EncodeColor(52)+O+EncodeColor(55)+" High-"+EncodeColor(5)+H+" "+EncodeColor(55)+"Low-"+EncodeColor(32)+L+" "+EncodeColor(55)+"Close-"+EncodeColor(52)+C+" "+EncodeColor(55)+ "Volume= "+EncodeColor(52)+ WriteVal(V)+"\n"+"\n"+

EncodeColor(colorLime)+
WriteIf (Buy, "Action: Go Long At "+C+" - SL " +DTSL,"")+
WriteIf (Short, "Action: Go Short At "+C+" - SL " +DTSL,"")+
WriteIf(Long AND NOT Buy, "Action : Long Taken At "+(BuyPrice)+" - Trail SL @ " + DTSL + "","")+
WriteIf(shrt AND NOT Sell, "Action : Short Taken At "+(SellPrice)+" - Trail SL @ " + DTSL + "","")+
WriteIf (Sell AND NOT Short, "Exit Long At "+C,"")+
WriteIf (Cover AND NOT Buy, "Exit Short At "+C,"")+
WriteIf(NOT Long AND NOT Buy AND NOT shrt AND NOT Sell, "Action: Not In A Trade - RELAX!!!","")+"\n"+
WriteIf(Long AND NOT Buy, "Profit/Loss: "+(C-BuyPrice)+" Points","")+
WriteIf(shrt AND NOT Sell, "Profit/Loss: "+(SellPrice-C)+" Points","")+"\n"+
WriteIf(Long OR Buy OR Shrt OR Short, "Target 1: "+tar1,"")+"\n"+
WriteIf(Long OR Buy OR Shrt OR Short, "Target 2: "+tar2,"")+"\n"+
WriteIf(Long OR Buy OR Shrt OR Short, "Target 3: "+tar3,"")+"\n"+
WriteIf(buyach1, "Target 1 Done: "+tar1,"")+
WriteIf(sellach1, "Target 1 Done: "+tar1,"")+"\n"+
WriteIf(buyach2, "Target 2 Done: "+tar2,"")+
WriteIf(sellach2, "Target 2 Done: "+tar2,"")+"\n"+
WriteIf(buyach3, "Target 3 Done: "+tar3,"")+
WriteIf(sellach3, "Target 3 Done: "+tar3,""));
}
for( i = 0; i < BarCount; i++ )
{
if( Buy )
{

OUTcolor = ParamColor("Outer Panel Color",colorTeal);
INUPcolor = ParamColor("Inner Panel Upper",colorDarkGrey);
INDNcolor = ParamColor("Inner Panel Lower",colorDarkOliveGreen);
TitleColor = ParamColor("Title Color ",colorBlack);
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
}
if( Sell )
{
OUTcolor = ParamColor("Outer Panel Color",colorTeal);
INUPcolor = ParamColor("Inner Panel Upper2",colorDarkTeal);
INDNcolor = ParamColor("Inner Panel Lower2",colorPlum);
TitleColor = ParamColor("Title Color ",colorBlack);
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
}
}
 

Similar threads