Sureshotformula.com afl needed

#31
Dear Friends ,
here is sure shot formula

_SECTION_BEGIN("ZigZag Retracement");
_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );








Pivot = ParamToggle("Pivot_NEXTday", "YES|NO", 1);

if(Pivot)
{
Hia = TimeFrameGetPrice("H", inDaily, -1); // yesterdays high
Loa = TimeFrameGetPrice("L", inDaily, -1); // low
C1a= TimeFrameGetPrice("C", inDaily, -1); // low

}
else
{
Hia = TimeFrameGetPrice("H", inDaily ); // yesterdays high
Loa = TimeFrameGetPrice("L", inDaily); // low
C1a = TimeFrameGetPrice("C", inDaily); // low


}



//Plot( (C1a),"close",colorBlack,4+8+2048);


//Plot( (Hia),"Dh",colorCustom12,4+8+2048);
//Plot( (Loa),"Dl",colorAqua,4+8+2048);
diff = Hia-Loa;
L102 =diff*0.382;
L103 =Loa+L102;


///Plot(L103 ,"E1",colorPink,4+8+2048);

L104 =diff*0.191;
L105 =Loa+L104;



//Plot(L105 ,"E2",colorGreen,4+8+2048);



L106 =L103-Loa;

L107 =L106*1.272;


L108 =L105+L107;

//Plot(L108 ,"E3",colorRed,4+8+2048);



L109 =L108-L105;

L110 =L109*0.5;


L111 =L108-L110;

//Plot(L111 ,"E4",colorOrange,4+8+2048);


L112 =L102+L111;


//Plot(L112,"E5",colorBrown,4+8+2048);






di =(Hia-L103);

//Plot(di,"di",colorTan,4+8+2048);











Lo=(Hia+L103)/2;


Plot(Lo,"TREND",colorGold,4+8+2048);


t1 =di*1.618;




DT=(Lo-t1);




Hi=(Lo+t1);





bearish = Hia-diff*0.618;


Plot(bearish,"BEARISH",colorOrange,4+8+2048);

bullish = Hia+diff*0.618;





diff = Hi-Lo;


H1 = Hi+diff*0.23836;
H2 =Hi+diff*0.38582;
H3 = Hi+diff*0.5050;
H4 = Hi+diff*0.62418;
H5 =Hi+diff*0.7716;
H6 = Hi+diff*0.89082;
H7 = Hi+diff*1;


H1 = Lo+diff*0.23836;
H2 =Lo+diff*0.38582;
H3 = Lo+diff*0.505;
H4 =Lo+diff*0.62418;
H5 =Lo+diff*0.7716;
H6 = Lo+diff*0.89082;
H7 = Lo+diff*1;


diff = Lo-DT;


H1 = DT+diff*0.23836;
H2 =DT+diff*0.38582;
H3 = DT+diff*0.505;
H4 =DT+diff*0.62418;
H5 =DT+diff*0.7716;
H6 = DT+diff*0.89082;
H7 = DT+diff*1;


H1 = DT-diff*0.23836;
H2 =DT-diff*0.38582;
H3 = DT-diff*0.505;
H4 =DT-diff*0.62418;
H5 =DT-diff*0.7716;
H6 = DT-diff*0.89082;
H7 = DT-diff*1;


_SECTION_END();

_SECTION_BEGIN("HH");
Q = Param( "% Change", 2, 0.1, 10, 0.1 );
Z = Zig( C , q ) ;
HH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( z, q, 1 ) > Peak( Z, q, 2 ) ) );
LH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( Z, q, 1 ) < Peak( Z, q, 2 ) ) );
HL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) > Trough( Z, q, 2 ) ) );
LL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) < Trough( Z, q, 2 ) ) );
GraphXSpace = 5;
dist = 0.5 * ATR( 20 );

for ( i = 0; i < BarCount; i++ )
{
if ( HH )
PlotText( "HH", i, H[ i ] + dist, colorRed );

if ( LH )
PlotText( "LH", i, H[ i ] + dist, colorRed );

if ( HL )
PlotText( "HL", i, L[ i ] - dist, colorBrightGreen );

if ( LL )
PlotText( "LL", i, L[ i ] - dist, colorBrightGreen );

}

Filter=HH OR HL OR LH OR LL;
AddColumn(RSI(2),"RSI",1.2);
AddColumn(Close,"PRICE",1.2);
AddColumn(HH,"SHORT");
AddColumn(LH,"LH");
AddColumn(HL,"HL");
AddColumn(LL,"COVER");
AddColumn(V,"volume",1.0);
_SECTION_END();

_SECTION_BEGIN("Realtimetips ");
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", colorBlack , styleNoTitle | styleCandle | GetPriceStyle() );
//
messageboard = ParamToggle("Message Board","Show|Hide",0);
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
no=10;
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);
s5d=IIf(avn==1,sup,res);

if (showsl == 0)
{Plot(s5d,"Stop Loss",colorCustom14,styleDots);}
exitlong = Cross(s5d, C);
PlotShapes(exitlong * shapeDownArrow, colorRed,0,H,-12);
exitshort = Cross(C, s5d);
PlotShapes(exitshort * shapeUpArrow, colorGreen,0,L,-12);

Buy = exitshort;
Sell = exitlong;
Short = Sell;
Cover = Buy;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = ExRem(Short, Cover);
Cover = ExRem(Cover, Short);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );

for(i=BarCount-1;i>1;i--)
{
if(Buy == 1)
{
entry = C;
sig = "BUY";
sl = s5d;
tar1 = entry + (entry * .0078);
tar2 = entry + (entry * .0234);
tar3 = entry + (entry * .0356);
bars = i;
i = 0;
}
if(Sell == 1)
{
sig = "SELL";
entry = C;
sl = s5d;
tar1 = entry - (entry * .0078);
tar2 = entry - (entry * .0234);
tar3 = entry - (entry * .0356);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorOrange);
ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -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);
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorCustom14, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorTurquoise, styleLine|styleDots, Null, Null, Offset);

for (i=bars; i <BarCount;i++)
{
PlotText("" + sig + " @ " + entry, BarCount+3, entry, Null, colorTurquoise);
PlotText("Target 1 : " + tar1, BarCount+3, tar1, Null, Clr);
PlotText("Target 2 : @ " + tar2, BarCount+3, tar2, Null, Clr);
PlotText("Target 3 : @ " + tar3, BarCount+3, tar3, Null, Clr);
PlotText("Trailing SL @ " + sl, BarCount+3, sl, Null, colorCustom14);
}
//Plot(sl, "", colorCustom14, styleLine);
printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2));

if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );

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

y = pxHeight;

GfxSelectPen( colorLightBlue, 1); // broader color
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;

GfxTextOut( (" ......................................."),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-120);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 13, y-100);
GfxTextOut( ("Target:1 : " + tar1), 13, y -80);
GfxTextOut( ("Target:2 : " + tar2), 13,y-60);
GfxTextOut( ("Target:3 : " + tar3), 13,y-40);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 13, y-22);;

x = 290;
x2 = 570;
GfxSelectSolidBrush( colorTurquoise );
GfxSetTextColor( colorBlack);
GfxSelectFont( "Tahoma", 14, 100 );
GfxSetBkMode( 1 );
GfxSelectPen( colorLightBlue, 1); // broader color
GfxRoundRect( x, y - 43, x2, y , 7, 7 ) ;

GfxSelectFont( "Tahoma", 10, 400 );

}
//

function PlotDT()
{
displacement = Param("Displacement Value", 12, 1, 100, 1);
slmode = ParamToggle("Stop Loss", "Auto|Manual", 1);
width = ParamToggle("Width", "HL|OC", 1);
Count = Param("No. of DTL", 4, 4, 20, 1);
NewDay = Day()!= Ref(Day(), -1);

for (i=BarCount-1;i > 1; i--)
{
if(NewDay == 1)
{
printf("High : " + i);
if(width == 1)
{
DL = IIf(O < C, O, C);
DH = IIf(O > C, O, C);
}
else
{
DL = L;
DH = H;
}
Bars = i;
i = -1;
}
}

if(slmode==1)
{
distance = displacement;
}
else
{
distance = ((DH+DL)/2) * .01;
}

Plot(LineArray(BarCount - (BarCount-Bars+20), DH, BarCount+35, DH, 1), "", colorLime, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Buy Above " + DH + "; Stop Loss = " + DL, BarCount + 0, DH, colorBlack, colorLime);
Plot(LineArray(BarCount - (BarCount-Bars+20), (DH+ distance), BarCount+35, (DH+ distance), 1), "", colorLime, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Target = " + (DH+ distance), BarCount + 0, (DH+ distance), colorBlack, colorLime);
Plot(LineArray(BarCount - (BarCount-Bars+20), DL, BarCount+35, DL, 1), "", colorOrange, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Sell Below " + DL + "; Stop Loss = " + DH, BarCount + 0, DL, colorBlack, colorOrange);
Plot(LineArray(BarCount - (BarCount-Bars+20), (DL-distance), BarCount+35, (DL-distance), 1), "", colorOrange, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Target = " + (DL-distance), BarCount + 0, (DL-distance), colorBlack, colorOrange);
}
function PlotIndicators()
{

SetChartOptions(0,chartShowArrows|chartShowDates);
/* Standard Error Bands */
Periods = Param("Standard Error", 80, 3, 200, 1);
Smooth = Param("Smooth",14,2,100,1);


LRCurve = LinearReg( C, periods );
MALRCurve = MA(LRCurve, Smooth);
SEValue = StdErr( C, periods );
SErrorAvg = MA(SEValue, Smooth);

LowerBand = MALRCurve - SErrorAvg ;
UpperBand = MALRCurve + SErrorAvg ;

Plot( MALRCurve , "MidBand", ParamColor("ColorMB",colorIndigo) , styleDashed|styleNoTitle);
Plot( LowerBand , "LowerBand", ParamColor("ColorLo",colorOrange) , styleLine|styleThick|styleNoTitle);
Plot( UpperBand , "UpperBand", ParamColor("ColorUp",colorGreen) , styleLine|styleThick|styleNoTitle);

Ch = TimeFrameGetPrice("C", in1Minute/60);
clr = IIf(Ch[BarCount-2] > Ch[BarCount-1],colorRed,colorLime);

Plot(LineArray(0,C[BarCount-1],BarCount-1,C[BarCount-1],15), "", Clr, styleLine|styleNoLabel, Null, Null, 30);
PlotText("CMP:" + C[BarCount-1], BarCount+5, C[BarCount-1],colorBlack,Clr);

LRPeriods = Param("Length", 40, 3, 200, 1);
LRCurve = LinearReg( C, LRPeriods );

PlotLR = IIf(LRCurve < LowerBand, (LRCurve + LowerBand)/2, IIf(LRCurve > UpperBand, (LRCurve + UpperBand)/2, LRCurve));
PlotLR = (PlotLR + SwingLine)/2;
//Plot( PlotLR , "Stop Loss |", ParamColor("SLColor",colorBlue), 4+8+32+2048);
//Plot( SwingLine, "SwingLine", ParamColor( "SWColor", colorBlue ), ParamStyle("StyleSW",style=styleThick|styleNoLabel , mask=maskDefault) );

bc1 = (Cross(C, MALRCurve) OR Cross(C, UpperBand) OR Cross(C, LowerBand)) AND (C > SwingLine);
bc2 = Cross(C, SwingLine) AND (C > MALRCurve OR C > UpperBand OR C > LowerBand);

sc1 = (Cross(MALRCurve, C) OR Cross(UpperBand, C) OR Cross(LowerBand, C)) AND (C < SwingLine);
sc2 = Cross(SwingLine, C) AND (C < MALRCurve OR C < UpperBand OR C < LowerBand);
Buy = bc1 OR bc2;
Sell = sc1 OR sc2;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
//PlotShapes(shapeCircle*Buy + shapeCircle *Sell, IIf(Buy, colorBlue, colorRed), 0, IIf(Buy, L, H), IIf(Buy, -12, 12));

}
//PlotDT();
_SECTION_END();:clapping:
 
#32
Dear Friends ,
here is sure shot formula

_SECTION_BEGIN("ZigZag Retracement");
_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );








Pivot = ParamToggle("Pivot_NEXTday", "YES|NO", 1);

if(Pivot)
{
Hia = TimeFrameGetPrice("H", inDaily, -1); // yesterdays high
Loa = TimeFrameGetPrice("L", inDaily, -1); // low
C1a= TimeFrameGetPrice("C", inDaily, -1); // low

}
else
{
Hia = TimeFrameGetPrice("H", inDaily ); // yesterdays high
Loa = TimeFrameGetPrice("L", inDaily); // low
C1a = TimeFrameGetPrice("C", inDaily); // low


}



//Plot( (C1a),"close",colorBlack,4+8+2048);


//Plot( (Hia),"Dh",colorCustom12,4+8+2048);
//Plot( (Loa),"Dl",colorAqua,4+8+2048);
diff = Hia-Loa;
L102 =diff*0.382;
L103 =Loa+L102;


///Plot(L103 ,"E1",colorPink,4+8+2048);

L104 =diff*0.191;
L105 =Loa+L104;



//Plot(L105 ,"E2",colorGreen,4+8+2048);



L106 =L103-Loa;

L107 =L106*1.272;


L108 =L105+L107;

//Plot(L108 ,"E3",colorRed,4+8+2048);



L109 =L108-L105;

L110 =L109*0.5;


L111 =L108-L110;

//Plot(L111 ,"E4",colorOrange,4+8+2048);


L112 =L102+L111;


//Plot(L112,"E5",colorBrown,4+8+2048);






di =(Hia-L103);

//Plot(di,"di",colorTan,4+8+2048);











Lo=(Hia+L103)/2;


Plot(Lo,"TREND",colorGold,4+8+2048);


t1 =di*1.618;




DT=(Lo-t1);




Hi=(Lo+t1);





bearish = Hia-diff*0.618;


Plot(bearish,"BEARISH",colorOrange,4+8+2048);

bullish = Hia+diff*0.618;





diff = Hi-Lo;


H1 = Hi+diff*0.23836;
H2 =Hi+diff*0.38582;
H3 = Hi+diff*0.5050;
H4 = Hi+diff*0.62418;
H5 =Hi+diff*0.7716;
H6 = Hi+diff*0.89082;
H7 = Hi+diff*1;


H1 = Lo+diff*0.23836;
H2 =Lo+diff*0.38582;
H3 = Lo+diff*0.505;
H4 =Lo+diff*0.62418;
H5 =Lo+diff*0.7716;
H6 = Lo+diff*0.89082;
H7 = Lo+diff*1;


diff = Lo-DT;


H1 = DT+diff*0.23836;
H2 =DT+diff*0.38582;
H3 = DT+diff*0.505;
H4 =DT+diff*0.62418;
H5 =DT+diff*0.7716;
H6 = DT+diff*0.89082;
H7 = DT+diff*1;


H1 = DT-diff*0.23836;
H2 =DT-diff*0.38582;
H3 = DT-diff*0.505;
H4 =DT-diff*0.62418;
H5 =DT-diff*0.7716;
H6 = DT-diff*0.89082;
H7 = DT-diff*1;


_SECTION_END();

_SECTION_BEGIN("HH");
Q = Param( "% Change", 2, 0.1, 10, 0.1 );
Z = Zig( C , q ) ;
HH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( z, q, 1 ) > Peak( Z, q, 2 ) ) );
LH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( Z, q, 1 ) < Peak( Z, q, 2 ) ) );
HL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) > Trough( Z, q, 2 ) ) );
LL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) < Trough( Z, q, 2 ) ) );
GraphXSpace = 5;
dist = 0.5 * ATR( 20 );

for ( i = 0; i < BarCount; i++ )
{
if ( HH )
PlotText( "HH", i, H[ i ] + dist, colorRed );

if ( LH )
PlotText( "LH", i, H[ i ] + dist, colorRed );

if ( HL )
PlotText( "HL", i, L[ i ] - dist, colorBrightGreen );

if ( LL )
PlotText( "LL", i, L[ i ] - dist, colorBrightGreen );

}

Filter=HH OR HL OR LH OR LL;
AddColumn(RSI(2),"RSI",1.2);
AddColumn(Close,"PRICE",1.2);
AddColumn(HH,"SHORT");
AddColumn(LH,"LH");
AddColumn(HL,"HL");
AddColumn(LL,"COVER");
AddColumn(V,"volume",1.0);
_SECTION_END();

_SECTION_BEGIN("Realtimetips ");
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", colorBlack , styleNoTitle | styleCandle | GetPriceStyle() );
//
messageboard = ParamToggle("Message Board","Show|Hide",0);
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
no=10;
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);
s5d=IIf(avn==1,sup,res);

if (showsl == 0)
{Plot(s5d,"Stop Loss",colorCustom14,styleDots);}
exitlong = Cross(s5d, C);
PlotShapes(exitlong * shapeDownArrow, colorRed,0,H,-12);
exitshort = Cross(C, s5d);
PlotShapes(exitshort * shapeUpArrow, colorGreen,0,L,-12);

Buy = exitshort;
Sell = exitlong;
Short = Sell;
Cover = Buy;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = ExRem(Short, Cover);
Cover = ExRem(Cover, Short);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );

for(i=BarCount-1;i>1;i--)
{
if(Buy == 1)
{
entry = C;
sig = "BUY";
sl = s5d;
tar1 = entry + (entry * .0078);
tar2 = entry + (entry * .0234);
tar3 = entry + (entry * .0356);
bars = i;
i = 0;
}
if(Sell == 1)
{
sig = "SELL";
entry = C;
sl = s5d;
tar1 = entry - (entry * .0078);
tar2 = entry - (entry * .0234);
tar3 = entry - (entry * .0356);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorOrange);
ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -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);
Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorCustom14, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorTurquoise, styleLine|styleDots, Null, Null, Offset);

for (i=bars; i <BarCount;i++)
{
PlotText("" + sig + " @ " + entry, BarCount+3, entry, Null, colorTurquoise);
PlotText("Target 1 : " + tar1, BarCount+3, tar1, Null, Clr);
PlotText("Target 2 : @ " + tar2, BarCount+3, tar2, Null, Clr);
PlotText("Target 3 : @ " + tar3, BarCount+3, tar3, Null, Clr);
PlotText("Trailing SL @ " + sl, BarCount+3, sl, Null, colorCustom14);
}
//Plot(sl, "", colorCustom14, styleLine);
printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2));

if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );

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

y = pxHeight;

GfxSelectPen( colorLightBlue, 1); // broader color
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;

GfxTextOut( (" ......................................."),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-120);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 13, y-100);
GfxTextOut( ("Target:1 : " + tar1), 13, y -80);
GfxTextOut( ("Target:2 : " + tar2), 13,y-60);
GfxTextOut( ("Target:3 : " + tar3), 13,y-40);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 13, y-22);;

x = 290;
x2 = 570;
GfxSelectSolidBrush( colorTurquoise );
GfxSetTextColor( colorBlack);
GfxSelectFont( "Tahoma", 14, 100 );
GfxSetBkMode( 1 );
GfxSelectPen( colorLightBlue, 1); // broader color
GfxRoundRect( x, y - 43, x2, y , 7, 7 ) ;

GfxSelectFont( "Tahoma", 10, 400 );

}
//

function PlotDT()
{
displacement = Param("Displacement Value", 12, 1, 100, 1);
slmode = ParamToggle("Stop Loss", "Auto|Manual", 1);
width = ParamToggle("Width", "HL|OC", 1);
Count = Param("No. of DTL", 4, 4, 20, 1);
NewDay = Day()!= Ref(Day(), -1);

for (i=BarCount-1;i > 1; i--)
{
if(NewDay == 1)
{
printf("High : " + i);
if(width == 1)
{
DL = IIf(O < C, O, C);
DH = IIf(O > C, O, C);
}
else
{
DL = L;
DH = H;
}
Bars = i;
i = -1;
}
}

if(slmode==1)
{
distance = displacement;
}
else
{
distance = ((DH+DL)/2) * .01;
}

Plot(LineArray(BarCount - (BarCount-Bars+20), DH, BarCount+35, DH, 1), "", colorLime, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Buy Above " + DH + "; Stop Loss = " + DL, BarCount + 0, DH, colorBlack, colorLime);
Plot(LineArray(BarCount - (BarCount-Bars+20), (DH+ distance), BarCount+35, (DH+ distance), 1), "", colorLime, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Target = " + (DH+ distance), BarCount + 0, (DH+ distance), colorBlack, colorLime);
Plot(LineArray(BarCount - (BarCount-Bars+20), DL, BarCount+35, DL, 1), "", colorOrange, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Sell Below " + DL + "; Stop Loss = " + DH, BarCount + 0, DL, colorBlack, colorOrange);
Plot(LineArray(BarCount - (BarCount-Bars+20), (DL-distance), BarCount+35, (DL-distance), 1), "", colorOrange, styleLine|styleThick|styleDots, Null, Null, 20);
PlotText("Target = " + (DL-distance), BarCount + 0, (DL-distance), colorBlack, colorOrange);
}
function PlotIndicators()
{

SetChartOptions(0,chartShowArrows|chartShowDates);
/* Standard Error Bands */
Periods = Param("Standard Error", 80, 3, 200, 1);
Smooth = Param("Smooth",14,2,100,1);


LRCurve = LinearReg( C, periods );
MALRCurve = MA(LRCurve, Smooth);
SEValue = StdErr( C, periods );
SErrorAvg = MA(SEValue, Smooth);

LowerBand = MALRCurve - SErrorAvg ;
UpperBand = MALRCurve + SErrorAvg ;

Plot( MALRCurve , "MidBand", ParamColor("ColorMB",colorIndigo) , styleDashed|styleNoTitle);
Plot( LowerBand , "LowerBand", ParamColor("ColorLo",colorOrange) , styleLine|styleThick|styleNoTitle);
Plot( UpperBand , "UpperBand", ParamColor("ColorUp",colorGreen) , styleLine|styleThick|styleNoTitle);

Ch = TimeFrameGetPrice("C", in1Minute/60);
clr = IIf(Ch[BarCount-2] > Ch[BarCount-1],colorRed,colorLime);

Plot(LineArray(0,C[BarCount-1],BarCount-1,C[BarCount-1],15), "", Clr, styleLine|styleNoLabel, Null, Null, 30);
PlotText("CMP:" + C[BarCount-1], BarCount+5, C[BarCount-1],colorBlack,Clr);

LRPeriods = Param("Length", 40, 3, 200, 1);
LRCurve = LinearReg( C, LRPeriods );

PlotLR = IIf(LRCurve < LowerBand, (LRCurve + LowerBand)/2, IIf(LRCurve > UpperBand, (LRCurve + UpperBand)/2, LRCurve));
PlotLR = (PlotLR + SwingLine)/2;
//Plot( PlotLR , "Stop Loss |", ParamColor("SLColor",colorBlue), 4+8+32+2048);
//Plot( SwingLine, "SwingLine", ParamColor( "SWColor", colorBlue ), ParamStyle("StyleSW",style=styleThick|styleNoLabel , mask=maskDefault) );

bc1 = (Cross(C, MALRCurve) OR Cross(C, UpperBand) OR Cross(C, LowerBand)) AND (C > SwingLine);
bc2 = Cross(C, SwingLine) AND (C > MALRCurve OR C > UpperBand OR C > LowerBand);

sc1 = (Cross(MALRCurve, C) OR Cross(UpperBand, C) OR Cross(LowerBand, C)) AND (C < SwingLine);
sc2 = Cross(SwingLine, C) AND (C < MALRCurve OR C < UpperBand OR C < LowerBand);
Buy = bc1 OR bc2;
Sell = sc1 OR sc2;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
//PlotShapes(shapeCircle*Buy + shapeCircle *Sell, IIf(Buy, colorBlue, colorRed), 0, IIf(Buy, L, H), IIf(Buy, -12, 12));

}
//PlotDT();
_SECTION_END();:clapping:


kuch had tak milta julta hai
 
#34
_SECTION_BEGIN("S Tr");


GraphXSpace=5;
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.8);
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
barcolor = IIf(HaClose >= HaOpen,colorWhite,colorWhite);
if( ParamToggle("Plot Heikin-Ashi", "No,Yes", 1 ) )
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "Heikin Ashi " + Name(), colorWhite, styleCandle );
else
Plot( C, "Regular candles " + Name(), colorWhite, styleCandle );
j=Haclose;


//PRICE LINE

PriceLineColor = PriceLineColor= colorCustom11;
PriceLevel = C;

Daysback = 200;
FirstBar = BarCount - DaysBack;
YY = IIf(BarIndex() >= Firstbar,EndValue(PriceLevel),Null);

Plot(YY,"Current Price",PriceLineColor,ParamStyle("LineStyle",styleLine|styleDashed|styleNoTitle|styleThick,maskAll));


side = 1;

dist = 0;



_SECTION_END();


//---- A T R


Factor=Param("Factor",0.53,0.01,10,0.01);
Pd=Param("ATR Periods",2,1,100,1);
Up=(H+L)/2+(Factor*ATR(Pd));
Dn=(H+L)/2-(Factor*ATR(Pd));
iATR=ATR(Pd);
TrendUp=TrendDown=Null;
trend[0]=1;
changeOfTrend=0;
flag=flagh=0;

for (i = 1; i <BarCount-1; i++) {
TrendUp = Null;
TrendDown = Null;

trend=1;


if (Close>Up[i-1]) {
trend=1;
if (trend[i-1] == -1) changeOfTrend = 1;

}
else if (Close<Dn[i-1]) {
trend=-1;
if (trend[i-1] == 1) changeOfTrend = 1;
}
else if (trend[i-1]==1) {
trend=1;
changeOfTrend = 0;
}
else if (trend[i-1]==-1) {
trend=-1;
changeOfTrend = 0;
}

if (trend<0 && trend[i-1]>0) {
flag=1;
}
else {
flag=0;
}

if (trend>0 && trend[i-1]<0) {
flagh=1;
}
else {
flagh=0;
}

if (trend>0 && Dn<Dn[i-1]){
Dn=Dn[i-1];
}

if (trend<0 && Up>Up[i-1])
{ Up=Up[i-1];
}

if (flag==1)
{ Up=(H+L)/2+(Factor*iATR);;
}
if (flagh==1)
{ Dn=(H+L)/2-(Factor*iATR);;
}
if (trend==1) {
TrendUp=Dn;
if (changeOfTrend == 1) {
TrendUp[i-1] = TrendDown[i-1];
changeOfTrend = 0;
}
}
else if (trend==-1) {
TrendDown=Up;
if (changeOfTrend == 1) {
TrendDown[i-1] = TrendUp[i-1];
changeOfTrend = 0;
}
}
}

Plot(TrendUp,"Trend",colorGreen);
Plot(TrendDown,"Down",colorRed);

Buy = trend==1;
Sell=trend==-1;

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


BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);
ShortPrice=ValueWhen(Short,C);
CoverPrice=ValueWhen(Cover,C);


Title = EncodeColor(colorWhite)+ Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) +
" - " + Date() +" - "+"\n" +EncodeColor(colorRed) +
EncodeColor(colorLime)+
WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+
WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(colorYellow)+
WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"","");


PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorLime, 0,L, Offset=-25);

PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-25);

TrendSL=IIf(trend==1,TrendUp,TrendDown);

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

bars = i;
i = 0;
}
if(Sell == 1)
{
sig = "SELL";
entry = O;
sl = TrendSL;
tar1 = entry - (entry * .0050);
tar2 = entry - (entry * .0112);
tar3 = entry - (entry * .0212);


bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, TrendSL[BarCount-1], Ref(TrendSL, -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);

//Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset);
//Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset);

/*
for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+entry, BarCount-5,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount-5,tar1,Null,Clr);PlotText("T2@"+tar2,BarCount-5,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount-5,tar3,Null,Clr);

}*/

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

if ( sig =="BUY")
{
GfxSelectSolidBrush( colorGreen ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 1;
x2 = 150;

y = pxHeight;

GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x, y - 98, x2, y , 7, 7 ) ;
GfxTextOut( ( "Supertrend"),5,y-100);
GfxTextOut( (" "),27,y-100);
GfxTextOut( ( sig + (BarCount-bars-1) * Interval()/60 + " mins ago"), 5, y-80) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 5, y-60);
GfxTextOut( ("Trl SL : " + TrendSL + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 5, y-40);
/*GfxTextOut( ("TGT:1 : " + tar1), 13, y -80);
GfxTextOut( ("TGT:2 : " + tar2), 13,y-60);
GfxTextOut( ("TGT:3 : " + tar3), 13,y-40);*/
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 5, y-22);;




//Magfied Market Price
FS=20;
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor (colorBrightGreen );
Hor=1;
Ver=8;
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Times New Roman", 11, 700, True );
GfxSetBkMode( colorBlack );


}

_SECTION_END();
 
#35
//---- H K CHART

HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.8);
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
barcolor = IIf(HaClose >= HaOpen,colorWhite,colorWhite);
if( ParamToggle("Plot Heikin-Ashi", "No,Yes", 1 ) )
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "Heikin Ashi " + Name(), colorWhite, styleCandle );
else
Plot( C, "Regular candles " + Name(), colorWhite, styleCandle );
j=Haclose;

//PRICE LINE

PriceLineColor = PriceLineColor= colorCustom11;
PriceLevel = C;

Daysback = 200;
FirstBar = BarCount - DaysBack;
YY = IIf(BarIndex() >= Firstbar,EndValue(PriceLevel),Null);

Plot(YY,"Current Price",PriceLineColor,ParamStyle("LineStyle",styleLine|styleDashed|styleNoTitle|styleThick,maskAll));


side = 1;

dist = 0;


_SECTION_END();




_SECTION_BEGIN("Advanced Support & Resistance");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} ,{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
//Plot(C, "", IIf(O>=C, colorRed, colorBlue),styleCandle);

//SetChartBkGradientFill( ParamColor("Inner panel upper",colorBlack),ParamColor("Inner panel lower",colorBlack));
_N(Title = EncodeColor(colorWhite)+StrFormat(" {{NAME}} - {{INTERVAL}} {{DATE}} Open:%g, Close:%g ,{{VALUES}}",O,C ));

////////////////////////////////////////////////////////

//Plot(MA(C,15),"",colorViolet);
////////////////////////////////////////////////////////

per1=Param ("per1", 0.09,0.01,50,0.01);

per=per1;
x = Cum(1);
s1=L;
s11=H;
pS = TroughBars( s1, per, 1 ) == 0;
endt= SelectedValue(ValueWhen( pS, x, 1 ));
startt=SelectedValue(ValueWhen( pS, x, 2 ));
dtS =endt-startt;
endS = SelectedValue(ValueWhen( pS, s1, 1 ) );
startS = SelectedValue( ValueWhen( pS, s1, 1 ));
aS = (endS-startS)/dtS;
bS = endS;
trendlineS = aS * ( x -endt ) + bS;
g3= IIf(x>startt-10,trendlineS,-1e10);
Plot(g3,"",colorRed,styleDots,styleThick);
//Plot(g3,"",colorRed,styleThick);

pR = PeakBars( s11, per, 1 ) == 0;
endt1= SelectedValue(ValueWhen( pR, x, 1 ));
startt1=SelectedValue(ValueWhen( pR, x, 2 ));
dtR =endt1-startt1;
endR = SelectedValue(ValueWhen( pR, s11, 1 ) );
startR = SelectedValue( ValueWhen( pR, s11, 1 ));
aR = (endR-startR)/dtR;
bR = endR;
trendlineR = aR * ( x -endt1 ) + bR;
g4= IIf(x>startT1-10,trendlineR,-1e10);
Plot(g4,"",colorGreen,styleDots,styleThick);
//Plot(g4,"",colorBrightGreen,styleThick);

///////////////////////////////////////////////////////////////
perc=per1;
x=BarIndex();xx=SelectedValue(x);
t1=SelectedValue(ValueWhen(PeakBars(C,perc)==0,x)) ;
H1=SelectedValue(ValueWhen(PeakBars(C,perc)==0,C)) ;
t11=SelectedValue(ValueWhen(TroughBars(C,perc)==0, x));
H11=SelectedValue(ValueWhen(TroughBars(C,perc)==0, C));
g=t1>t11;
shape=IIf(g,shapeDownArrow*(x==t1),shapeUpArrow*(x ==t11));
Color=IIf(g,colorRed,colorBrightGreen);
PlotShapes(shape,color);
//////////////////////////////////////////////////////////

per=per1;

x = Cum(1);
s1=C;
s11=C;
pS = TroughBars( s1, per, 1 ) == 0;
endt= SelectedValue(ValueWhen( pS, x, 1 ));
startt=SelectedValue(ValueWhen( pS, x, 2 ));
dtS =endt-startt;
endS = SelectedValue(ValueWhen( pS, s1, 1 ) );
startS = SelectedValue( ValueWhen( pS, s1, 2 ));
aS = (endS-startS)/dtS;
bS = endS;
trendlineS = aS * ( x -endt ) + bS;
g3= IIf(x>startt-10,trendlineS,-1e10);
Plot(g3,"",colorYellow,styleThick);

pR = PeakBars( s11, per, 1 ) == 0;
endt1= SelectedValue(ValueWhen( pR, x, 1 ));
startt1=SelectedValue(ValueWhen( pR, x, 2 ));
dtR =endt1-startt1;
endR = SelectedValue(ValueWhen( pR, s11, 1 ) );
startR = SelectedValue( ValueWhen( pR, s11, 2 ));
aR = (endR-startR)/dtR;
bR = endR;
trendlineR = aR * ( x -endt1 ) + bR;
g4= IIf(x>startT1-10,trendlineR,-1e10);
Plot(g4,"",colorYellow,styleThick);
_SECTION_END();

_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",21,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBrightGreen) );
Hor=Param("Horizontal Position",1,1,1200,1);
Ver=Param("Vertical Position",7,1,830,1);
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Times New Roman", 12, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorGreen) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+30 );
GraphXSpace=5;
_SECTION_END();
 
#37
Code:
///////////This system has kpl swing with ishimaku clouds and targets and stop loss

/////////////////////////////////// Programs Begins

//////////////////with near days high low scanner

_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();



PctVlt=(ATR(10)/C)*100;//PercentVolatility

PK=IIf(PctVlt<0.5,Peak(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Peak(Close,0.70,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Peak(Close,0.90,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Peak(Close,1.10,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Peak(Close,1.30,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Peak(Close,1.50,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Peak(Close,1.70,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Peak(Close,2.00,1),
Peak(Close,2.20,1) ))))))));

TGH=IIf(PctVlt<0.5,Trough(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Trough(Close,0.75,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Trough(Close,1.00,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Trough(Close,1.25,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Trough(Close,1.50,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Trough(Close,1.75,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Trough(Close,2.00,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Trough(Close,2.25,1),
Trough(Close,2.50,1) ))))))));

Sens=IIf(PctVlt<0.5,0.5,
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,0.75,
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,1.00,
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,1.25,
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,1.50,
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,1.75,
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,2.00,
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,2.25,
2.50 ))))))));


Color=IIf(BarsSince(Cross(C,Ref(PK,-1)))<BarsSince(Cross(Ref(TGH,-1),C)),colorBrightGreen,colorRed);
Plot(C,"",Color,styleCandle);


DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily); // current day open
DayH2= TimeFrameGetPrice("H", inDaily, -2); DayH2I = LastValue (DayH2,1); // Two days before high
DayL2= TimeFrameGetPrice("L", inDaily, -2); DayL2I = LastValue (DayL2,1); // Two days before low
DayH3= TimeFrameGetPrice("H", inDaily, -3); DayH3I = LastValue (DayH3,1); // Three days before high
DayL3= TimeFrameGetPrice("L", inDaily, -3); DayL3I = LastValue (DayL3,1); // Three days before low

numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;


 


////////////////////////////////////////////////////////////////////////////////////////////////




////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

messageboard = ParamToggle("Message Board","Show|Hide",0);
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
no=10;
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);
s5d=IIf(avn==1,sup,res);

if (showsl == 0)
//{Plot(s5d,"Stop Loss",colorCustom14,styleDots);}
exitlong = Cross(s5d, H);
PlotShapes(exitlong * shapeDownArrow, colorYellow,0,H,-10);
exitshort = Cross(L, s5d);
PlotShapes(exitshort * shapeUpArrow, colorGreen,0,L,-15);

Buy = exitshort;
Sell = exitlong;
//Short = Sell;
//Cover = Buy;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
//Short = ExRem(Short, Cover);
//Cover = ExRem(Cover, Short);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2 );

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

bars = i;
i = 0;
}
if(Sell[i] == 1)
{
sig = "SELL";
entry = C[i];
sl = s5d[i];
tar1 = entry - (entry * .0050);
tar2 = entry - (entry * .0112);
tar3 = entry - (entry * .0212);


bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -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);

Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset);

for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);PlotText("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);

}


printf("Last " + sig + " Signal came " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2));

if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );

if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBlue ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // 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( ( " Trading System "),88,y-165);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",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 P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 88, y-22);;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////

 

//////////////////////////////////////////////////////////////////////////////////////////////////////////

_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,30,100,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBlack) );
Hor=Param("Horizontal Position",750,800,800,800);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
_SECTION_END();

////////////////////////////////////////////////////////////////////////////////




/////////////////////////////////////////////////////////////////////////////////////





/*Plot EMA*/
Plot( EMA( Close,13), "13 EMA", colorRed,styleLine);
Plot( EMA( Close,34), "34 EMA", colorBlue,styleLine);
Plot( EMA( Close,55), "55 EMA", colorBlack,styleLine);
Plot( EMA( Close,89), "89 EMA", colorYellow,styleLine);

//////////////////////Clouds
_SECTION_BEGIN("Ichimoku Cloud Charts");
GraphXSpace =1;
prds = Param("Standard Line Periods?", 13,5,26,1);
prds1 = Param("Turning Line Periods?", 3,3,10,1);
prds2 = Param("Delayed Line Periods?", 12,4,25,1);
prds3 = Param("Spans Periods?", 16,10,52,1);
TL = ( HHV( H, prds1) + LLV( L, prds1) )/2;
SL = ( HHV( H, prds) + LLV( L, prds) )/2;
DL = Ref( C, prds2);
Sp1 = Ref( ( SL + TL )/2, -prds2);
Sp2 = Ref( (HHV( H, prds3) + LLV(L, prds3))/2, -prds2);
SetChartOptions( 0, chartShowDates | chartShowArrows | chartLogarithmic | chartWrapTitle );
_N( Title = StrFormat( "{{NAME}} - " + SectorID( 1 ) + " - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " + WriteVal( V, 1.0 ) + " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );
if ( ParamToggle( "Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip = StrFormat( "Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: " + NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 ) ) );
}
PlotOHLC (Sp1,Sp1,Sp2,Sp2,"Cloud",IIf(Sp1>Sp2,ParamColor("Span1 Color", ColorRGB(0,255,0)),ParamColor("Span2 Color",ColorRGB(255,104,32))),styleCloud);

_SECTION_END(); 

/////////////////////////////////////Kpl Swing
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//kpl swing formula here
//---- heikin ashi
HaClose = (O+H+L+C)/4; 
HaOpen = AMA( Ref( HaClose, -1 ), .40); 
HaHigh = Max( H, Max( HaClose, HaOpen ) ); 
HaLow = Min( L, Min( HaClose, HaOpen ) ); 
xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
// Plot(EMA(HaClose,9),"",colorWhite, styleLine);
// Plot(EMA(HaClose,18),"",colorBlack, styleLine);
_SECTION_BEGIN("KPL Swing");
no=Param( "Swing", 10, 1, 55 );
tsl_col=ParamColor( "Color", colorCycle );

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

Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea

_SECTION_END();





////////////////////details of stock at the title

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

_SECTION_END();



/////////////////////weekly high low

_SECTION_BEGIN("weekly-H-L");
Hclose=HHV(H,5);
Lclose= LLV(L,5);
DH = EncodeColor(colorDarkBlue) + "weekly-H-L = " + Hclose + "\n";
DL = EncodeColor(colorDarkRed) + "weekly-H-L = " + Lclose + "\n";
_N(Title = StrFormat("{{NAME}} ({{INTERVAL}}), {{DATE}} ; {{OHLCX}}, V=%1.0f\n {{VALUES}}\n\n", V) + DH + DL);

_SECTION_END(); 

/////////////////Stock near days high and low scanner
TimeFrameSet(inHourly);
H1 = HHV(H, 1) ;

H2= (H1-C)< .001*C;

L1 = LLV(L,1) ;


L2 = (C-L1) < .001*C ;

TimeFrameRestore() ;

SetOption("NoDefaultColumns", True);

AddTextColumn(Name(), "Symbol");
AddColumn(DateTime(), "Date", formatDateTime);
AddColumn(C, "CMP", 1.2);



Filter = H2 OR L2 ;

Buy = H2 ;
Sell = L2 ;


///////////////////////////candle stick reader


_SECTION_BEGIN("Candle Identification");
O1 = Ref(O,-1);O2 = Ref(O,-2);
H1 = Ref(H,-1);H2 = Ref(H,-2);
L1 = Ref(L,-1);L2 = Ref(L,-2);
C1 = Ref(C,-1);C2 = Ref(C,-2);
function CandlePattern(P)
   {
   global PatternName;
   if(P == 0) { PatternName = "NearDoji"; Pv = (abs(O-C)<= ((H-L)*0.1)); }
   else if(P == 1) { PatternName = "BlackCandle"; Pv = (O>C); }
   else if(P == 2) { PatternName = "LongBlackCandle"; Pv = (O>C AND
(O-C)/(.001+H-L)>.6); }
   else if(P == 3) { PatternName = "SmallBlackCandle"; Pv = ((O>C) AND
((H-L)>(3*(O-C)))); }
   else if(P == 4) { PatternName = "WhiteCandle"; Pv = (C>O); }
   else if(P == 5) { PatternName = "LongWhiteCandle"; Pv = ((C>O) AND
((C-O)/(.001+H-L)>.6)); }
   else if(P == 6) { PatternName = "SmallWhiteCandle"; Pv = ((C>O) AND
((H-L)>(3*(C-O)))); }
   else if(P == 7) { PatternName = "BlackMaubozu"; Pv = (O>C AND H==O AND
C==L); }
   else if(P == 8) { PatternName = "WhiteMaubozu"; Pv = (C>O AND H==C AND
O==L); }
   else if(P == 9) { PatternName = "BlackClosingMarubozu"; Pv = (O>C AND
C==L); }
   else if(P == 10) { PatternName = "WhiteClosingMarubozu"; Pv = (C>O AND
C==H); }
   else if(P == 11) { PatternName = "BlackOpeningMarubozu"; Pv = (O>C AND
O==H); }
   else if(P == 12) { PatternName = "WhiteOpeningMarubozu"; Pv = (C>O AND
O==L); }
   else if(P == 13) { PatternName = "HangingMan"; Pv = (((H-L)>4*(O-C)) AND
((C-L)/(.001+H-L)>= 0.75) AND ((O-L)/(.001+H-L)>= 0.75)); }
   else if(P == 14) { PatternName = "Hammer"; Pv = (((H-L)>3*(O-C)) AND
((C-L)/(.001+H-L)>0.6) AND ((O-L)/(.001+H-L)>0.6)); }
   else if(P == 15) { PatternName = "InvertedHammer"; Pv = (((H-L)>3*(O-C))
AND ((H-C)/(.001+H-L)>0.6) AND ((H-O)/(.001+H-L)>0.6)); }
   else if(P == 16) { PatternName = "ShootingStar"; Pv = (((H-L)>4*(O-C))
AND ((H-C)/(.001+H-L)>= 0.75) AND ((H-O)/(.001+H-L)>= 0.75)); }
   else if(P == 17) { PatternName = "BlackSpinningTop"; Pv = ((O>C) AND
((H-L)>(3*(O-C))) AND (((H-O)/(.001+H-L))<.4) AND
(((C-L)/(.001+H-L))<.4)); }
   else if(P == 18) { PatternName = "WhiteSpinningTop"; Pv = ((C>O) AND
((H-L)>(3*(C-O))) AND (((H-C)/(.001+H-L))<.4) AND
(((O-L)/(.001+H-L))<.4)); }
   else if(P == 19) { PatternName = "BearishAbandonedBaby"; Pv = ((C1 == O1)
AND (C2>O2) AND (O>C) AND (L1>H2) AND (L1>H)); }
   else if(P == 20) { PatternName = "BearishEveningDojiStar"; Pv = ((C2>O2)
AND ((C2-O2)/(.001+H2-L2)>.6) AND (C2<O1) AND (C1>O1) AND
((H1-L1)>(3*(C1-O1))) AND (O>C) AND (O<O1)); }
   else if(P == 21) { PatternName = "DarkCloudCover"; Pv = (C1>O1 AND
((C1+O1)/2)>C AND O>C AND O>C1 AND C>O1 AND (O-C)/(.001+(H-L)>0.6)); }
   else if(P == 22) { PatternName = "BearishEngulfing"; Pv = ((C1>O1) AND
(O>C) AND (O>= C1) AND (O1>= C) AND ((O-C)>(C1-O1))); }
   else if(P == 23) { PatternName = "ThreeOutsideDownPattern"; Pv = ((C2>O2)
AND (O1>C1) AND (O1>= C2) AND (O2>= C1) AND ((O1-C1)>(C2-O2)) AND (O>C) AND
(C<C1)); }
   else if(P == 24) { PatternName = "BullishAbandonedBaby"; Pv = ((C1 == O1)
AND (O2>C2) AND (C>O) AND (L2>H1) AND (L>H1)); }
   else if(P == 25) { PatternName = "BullishMorningDojiStar"; Pv = ((O2>C2)
AND ((O2-C2)/(.001+H2-L2)>.6) AND (C2>O1) AND (O1>C1) AND
((H1-L1)>(3*(C1-O1))) AND (C>O) AND (O>O1)); }
   else if(P == 26) { PatternName = "BullishEngulfing"; Pv = ((O1>C1) AND
(C>O) AND (C>= O1) AND (C1>= O) AND ((C-O)>(O1-C1))); }
   else if(P == 27) { PatternName = "ThreeOutsideUpPattern"; Pv = ((O2>C2)
AND (C1>O1) AND (C1>= O2) AND (C2>= O1) AND ((C1-O1)>(O2-C2)) AND (C>O) AND
(C>C1)); }
   else if(P == 28) { PatternName = "BullishHarami"; Pv = ((O1>C1) AND (C>O)
AND (C<= O1) AND (C1<= O) AND ((C-O)<(O1-C1))); }
   else if(P == 29) { PatternName = "ThreeInsideUpPattern"; Pv = ((O2>C2)
AND (C1>O1) AND (C1<= O2) AND (C2<= O1) AND ((C1-O1)<(O2-C2)) AND (C>O) AND
(C>C1) AND (O>O1)); }
   else if(P == 30) { PatternName = "PiercingLine"; Pv = ((C1<O1) AND
(((O1+C1)/2)<C) AND (O<C) AND (O<C1) AND (C<O1) AND
((C-O)/(.001+(H-L))>0.6)); }
   else if(P == 31) { PatternName = "BearishHarami"; Pv = ((C1>O1) AND (O>C)
AND (O<= C1) AND (O1<= C) AND ((O-C)<(C1-O1))); }
   else if(P == 32) { PatternName = "ThreeInsideDownPattern"; Pv = ((C2>O2)
AND (O1>C1) AND (O1<= C2) AND (O2<= C1) AND ((O1-C1)<(C2-O2)) AND (O>C) AND
(C<C1) AND (O<O1)); }
   else if(P == 33) { PatternName = "ThreeWhiteSoldiers"; Pv = (C>O*1.01)
AND (C1>O1*1.01) AND (C2>O2*1.01) AND (C>C1) AND (C1>C2) AND (O<C1) AND
(O>O1) AND (O1<C2) AND (O1>O2) AND (((H-C)/(H-L))<.2) AND
(((H1-C1)/(H1-L1))<.2) AND (((H2-C2)/(H2-L2))<.2); }
   else if(P == 34) { PatternName = "DarkCloudCover"; Pv = (C1>O1*1.01) AND
(O>C) AND (O>H1) AND (C>O1) AND (((C1+O1)/2)>C) AND (C>O1) AND
(MA(C,13)-Ref(MA(C,13),-4)>0); }
   else if(P == 35) { PatternName = "ThreeBlackCrows"; Pv = (O>C*1.01) AND
(O1>C1*1.01) AND (O2>C2*1.01) AND (C<C1) AND (C1<C2) AND (O>C1) AND (O<O1)
AND (O1>C2) AND (O1<O2) AND (((C-L)/(H-L))<.2) AND (((C1-L1)/(H1-L1))<.2)
AND (((C2-L2)/(H2-L2))<.2); }
   else if(P == 36) { PatternName = "doji"; Pv = (O == C); }
   else if(P == 37) { PatternName = "GapUp"; Pv = GapUp(); }
   else if(P == 38) { PatternName = "GapDown"; Pv = GapDown(); }
   else if(P == 39) { PatternName = "BigGapUp"; Pv = L>1.01*H1; }
   else if(P == 40) { PatternName = "BigGapDown"; Pv = H<0.99*L1; }
   else if(P == 41) { PatternName = "HugeGapUp"; Pv = L>1.02*H1; }
   else if(P == 42) { PatternName = "HugeGapDown"; Pv = H<0.98*L1; }
   else if(P == 43) { PatternName = "DoubleGapUp"; Pv = GapUp() AND
Ref(GapUp(),-1); }
   else if(P == 44) { PatternName = "DoubleGapDown"; Pv = GapDown() AND
Ref(GapDown(),-1); }
   return Pv;
   }

PatternNameList = "";
for(Cp=0; Cp<=44; Cp++)
	{
	VarSet("Pattern"+NumToStr(Cp,1.0),CandlePattern(cP));
	PatternNameList = PatternNameList +PatternName+","; 
	}

BI = BarIndex();
SelectedBar = SelectedValue(BI) -BI[0];
//Selectedbar = Status("lastvisiblebar")-1;
PStr="";
for(Cp=0; Cp<=44; Cp++)
	{
	Temp = VarGet("Pattern"+NumToStr(Cp,1.0));
	if(temp[SelectedBar]) Pstr=Pstr+"#"+NumToStr(Cp,1.0)+" - "+StrExtract(PatternNameList,Cp)+"\n";
	}


FS=Param("Font Size",11,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True ); 
GfxSetBkMode( colorWhite );  
GfxSetTextColor( ParamColor("Color",colorWhite) ); 
Hor=Param("Horizontal Position",237,1,1200,1);
Ver=Param("Vertical Position",50,1,830,1); 
GfxTextOut("Candle Reader= "+Pstr, Hor , Ver );




_SECTION_END();


HTML:
 Thank you Subroto da and Johnney da for quick reply. I will check and if any problem arise then again i will request for help.

Soumen
Reply With Quote
Johnny da and Subroto da

Indicator is good and back tasting result is good. I did live trade and that is also good.
Problem is some time when chart gave sell signal i sold and losing money ....but when i shutdown and re open amiborker....there i saw previously its gave already buy signal (sell signal closed and buy signal started) and it should profit.....so i missed the journey due indicators and massage board problem and lost money..... How I solve the problem need help.
 

johnnypareek

Well-Known Member
#38
Hi,

First of all don't trade your regular but trade very small to get know indicator. As buy SL tgt is already will be there You must note down them if you trade in realtime. Keep chart open and when a signal comes backfill data and check if signal is still there. If yes then go ahead and remember that bar shud be complited then only the signal will be valid. As you have written sl n tgt keep booking profit at those levels and exit when opposite signal comes. Don't wait for tgt and sl if opposite signal comes.
 
#40
Dear Members,
Where I get last one year 5min intraday for crude oil, gold,copper and silver in excel or ami data? I need for my research.
Thanks in advance.

Regards

Soumen Bag
 

Similar threads