Simple Coding Help - No Promise.

Bro U want Stochastic in OHLC or u want stochastic colored Candle sticks as u shown in pic.
the pic u shared is not of OHLC stochastic
it gives green bar as stoch crosses 20 and so on
Thanks Extremist Bro for your kind reply..
Thanks for remove my confusion..
Yes, You are right, Actually I need Pure Stochastic indicator in OHLC (Stochastic in candlestick form)
Stochastic K%...
Thanks....
-tk
:)
 
Thank you for afl this one looks very much similar to the image posted :thumb:
yes ... if anybody can tweak it and then we will test it ...

All AFL trading systems are available freely and just tweaked and sold... ...

If you have noticed the ppl who are selling systems ......

They won't give you advance calls ... only post mortem charts stating that the AFL picked the buy/sell early ... and that too stocks which rallied or fell by more than 5% intraday will be picked ...

Cheers
 

Nehal_s143

Well-Known Member
yes ... if anybody can tweak it and then we will test it ...

All AFL trading systems are available freely and just tweaked and sold... ...

If you have noticed the ppl who are selling systems ......

They won't give you advance calls ... only post mortem charts stating that the AFL picked the buy/sell early ... and that too stocks which rallied or fell by more than 5% intraday will be picked ...

Cheers
This is chart of Fly candle on Crude oil



Chart generated using afl, area in yellow box is bullish, afl showing bearish.
still, afl is very much similar, may be need little bit tweak

photo uploading
 
This is chart of Fly candle on Crude oil



Chart generated using afl, area in yellow box is bullish, afl showing bearish.
still, afl is very much similar, may be need little bit tweak

photo uploading
You cannot reverse engineer a formula from its image.
 

jagankris

Well-Known Member
This is chart of Fly candle on Crude oil



Chart generated using afl, area in yellow box is bullish, afl showing bearish.
still, afl is very much similar, may be need little bit tweak

photo uploading
Does the fly candles represent exact price or there is deviation between the price (candle stick charts) vs fly candle as mentioned above ?
http://tradecatcher.blogspot.in/2014/01/swing-trading-system-v-20-amibroker-afl.html


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,colorGreen);
Plot(MA(HaClose,a),"", color20,styleThick);

Color=IIf(Haclose>MA(HaClose,a),colorGreen, colorRed);
PlotOHLC( HaOpen, HaOpen, HaClose, HaClose, "" + Name(), Color, styleCandle);
_SECTION_END();

_SECTION_BEGIN("Priyanvada's Price Action");
P = ParamField( "Price field" );
CandleT=ParamToggle("Candlestick Display","No|Yes",defaultval=1 );
BarT=ParamToggle("Bar Display","No|Yes",defaultval=0 );
LineT=ParamToggle("Line Display","No|Yes",defaultval=0 );
//T3MA toggle
T3MAT=ParamToggle("Moving Average","No|Yes",defaultval=1 );
//T3MA Check Periods
T3MAP = Param("T3MA Periods", 46, 2, 300, 1, 10 );

function T3(price,periods)
{
s = 0.84;
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
T3MA = T3(P,T3MAP);
for( i = 1; i < BarCount; i++ )
{
//assignments
NvadaOpen = Close[i-1];
NvadaClose=Close;
NvadaHigh=IIf(NvadaOpen>=NvadaClose,NvadaOpen,NvadaClose);
NvadaLow=IIf(NvadaOpen>=NvadaClose,NvadaClose,NvadaOpen);
averagechange=(NvadaOpen+NvadaClose)/2;

//=============================
//CHECKS

//check1= uptrend and upbar as referred for last 2 bars
Check1=averagechange>T3MA AND NvadaClose>=NvadaOpen[i-2];
//check2= uptrend and downbar as referred for last 2 bars
Check2=averagechange>T3MA AND NvadaClose<NvadaOpen[i-2];

//check3= downtrend and downbar as referred for last 2 bars
Check3=averagechange<T3MA AND NvadaClose<=NvadaOpen[i-2];
//check4= downtrend and upbar as referred for last 2 bars
Check4=averagechange<T3MA AND NvadaClose>NvadaOpen[i-2];

//check5=check2 or check 4 => possible corrections!
Check5=Check2 OR Check4;

//Color assignment
if(Check1==1){pricolor =colorGreen;}
if(Check3==1){pricolor =colorRed;}
if(Check5==1){pricolor =colorYellow;}
//Pricolor = IIf(NvadaClose>Ref(NvadaOpen,-2),colorGreen,colorRed);
}



//T3MA Display
if(T3MAT==1)
{
T3MAcolor = IIf(C>=T3MA,colorGreen,colorRed);
Plot(T3MA,"T3MA",T3MAcolor,styleThick);
}
Buy=T3MAcolor==colorGreen;
Sell=T3MAcolor==colorRed;
Short=Sell;
Cover=Buy;

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

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy , shapeUpArrow, shapeNone),colorWhite);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorYellow);
no=Param( "Swing", 12, 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);


Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase);




SetPositionSize(300,spsShares);
ApplyStop(0,1,10,1);
//-----------end--------------
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)+"",""));
_SECTION_END();


H1 = SelectedValue( TimeFrameGetPrice( "H", inDaily, -1 ) );
L1 = SelectedValue( TimeFrameGetPrice( "L", inDaily, -1 ) );
C1 = SelectedValue( TimeFrameGetPrice( "C", inDaily, -1 ) );
H2 = SelectedValue( TimeFrameGetPrice( "H", inDaily, 0 ) );
L2 = SelectedValue( TimeFrameGetPrice( "L", inDaily, 0 ) );
O1 = SelectedValue( TimeFrameGetPrice( "open", inDaily, 0 ) );
F4 = 0;
D1 = ( H1 - L1 );
D2 = ( H2 - L2 );
F1 = D1 * 0.433;
F2 = D1 * 0.766;
F3 = D1 * 1.35;
if ( D2 <= F1 )
F4 = F1;
else
if ( D2 <= F2 )
F4 = F2;
else
F4 = F3;

S_P = ( O1 - F4 );

B_P = ( O1 + F4 );

BP = ( L2 + F4 );

BPTGT = ( BP + ( BP * .0065 ) );//.0015 brokerage

BPSTPLS = ( BP - ( BP * .0085 ) );

SP = ( H2 - F4 );

SPTGT = ( SP - ( SP * .0065 ) );

SPSTPLS = ( SP + ( SP * .0085 ) );


p = ( H1 + L1 + C1 ) / 3;

s1 = ( H1 );

r1 = ( L1 );

r2 = SelectedValue( L2 );

s2 = SelectedValue( H2 );
Filter = Buy OR Sell;

AddColumn( IIf( Buy, 66, 1 ), "Buy", formatChar, 1, bkcolor = IIf( Buy, 43, 33 ) );

AddColumn( IIf( Sell, 83, 1 ), "Sell", formatChar, 1, bkcolor = IIf( Sell, 25, 32 ) );

AddColumn( IIf( Short, 83, 1 ), "Short", formatChar, 1, bkcolor = IIf( Short, 25, 32 ) );

AddColumn( C, "CMP", 1.2, colorDefault, colorLightBlue );

AddColumn( BP, "SELL PRICE", 1.2, colorDefault, colorGreen );

AddColumn( BPTGT, "TGT PRICE", 1.2, colorDefault, colorBrown );

AddColumn( BPSTPLS, "STPLS BUY", 1.2, colorDefault, colorRed );

AddColumn( p, "PIVOT", 1.2, colorDefault, colorYellow );

AddColumn( SPSTPLS, "STPLS SELL", 1.2, colorDefault, colorRed );

AddColumn( SP, "SELL PRICE", 1.2, colorDefault, colorGreen );

AddColumn( SPTGT, "TGT PRICE", 1.2, colorDefault, colorBrown );


AddColumn( H1, "PRE-HIGH" );

AddColumn( L1, "PRE-LOW" );

AddColumn( D1, "PRE-DIFF" );

AddColumn( F1, "0.433" );

AddColumn( F2, "0.766" );

AddColumn( F3, "1.35" );

AddColumn( H2, "D-HIGH" );

AddColumn( L2, "D-LOW" );

AddColumn( D2, "D-DIFF" );

AddColumn( F4, "SELECT FACT" );
_SECTION_END();
//============== TITLE ==============
_SECTION_BEGIN("Title");
if( Status("action") == actionIndicator )
(
Title = EncodeColor(colorGold)+ "K T S" + EncodeColor(colorRose)+" (" + Name() + ") " + EncodeColor(colorGold)+ Interval(2) +
" " + Date() +" " +" • Open "+WriteVal(O,1.000)+" • "+"Hi "+WriteVal(H,1.000)+" • "+"Lo "+WriteVal(L,1.000)+" • "+
"Close "+WriteVal(C,1.000)+" ("+WriteVal(C-Ref(C,-1),1,0)+" "+WriteVal((C-Ref(C,-1))*100/Ref(C,-1),1.1)+ "%) • Vol= "+ WriteVal(V,1.0)



+"\n"+EncodeColor(colorGrey50)+"------------------------------------------------------------------------------------------------------------"

+"\n"+EncodeColor(colorGold)+
WriteIf (Buy , "Signal: Go Long - Entry Price: "+WriteVal(C)+" - Traget: "+WriteVal((BuyPrice+tsl)+BuyPrice)
+" - StopLoss:"+WriteVal(tsl)+" "
,"")+


WriteIf (Sell , "Signal: Go Short - Entry Price: "+WriteVal(C)+" - Target: "+WriteVal((tsl-SellPrice)-SellPrice)+" - StopLoss:"+WriteVal(tsl)+" ","")+
EncodeColor(ColorRGB(111,208,255))+
WriteIf(Long AND NOT Buy, "Trade: Long - Entry Price: "+WriteVal((BuyPrice))+" - Profit: "+WriteVal((C-BuyPrice))+" "+EncodeColor(colorLime)+"Let your profit runs!","")+
WriteIf(shrt AND NOT Sell, "Trade: Short - Entry Price: "+WriteVal((SellPrice))+" - Profit: "+WriteVal((SellPrice-C))+" - "+EncodeColor(colorLime)+"Let your profit runs!","")

+"\n"+EncodeColor(colorGrey50)+"------------------------------------------------------------------------------------------------------------"
);

dist = 6*ATR(10);
dist1 = 6*ATR(10);
for( i = 0; i < BarCount; i++)
{
if( Buy )
{
PlotText( "Buy:" + C[ i ] + "\nT= " + tsl + "\nSL= " +((C-tsl)+C) , i, C[ i ]-dist, colorGreen, colorDarkOliveGreen );
}
if( Sell )
{
PlotText( "Sell:" + C[ i ] + "\nT= " + (C-(tsl-C)) + "\nSL= " +tsl, i, C[ i ]+dist1, colorRed, colorDarkOliveGreen );
}
}




/*Plot Ribbon */
Ribbon1=IIf( (C) >(tsl) ,colorWhite, IIf(( tsl )>( C ), colorOrange,colorYellow));
Plot(3, "Ribbon", Ribbon1, styleOwnScale| styleArea| styleNoLabel,-0.5,100);

_SECTION_END();

_SECTION_BEGIN("Background text");
BKswitch = ParamToggle("Background Color","On,Off");

OUTcolor = ParamColor("Outer Panel Color",colorTeal);
INUPcolor = ParamColor("Inner Panel Upper",colorDarkTeal);
INDNcolor = ParamColor("Inner Panel Lower",colorPlum);
TitleColor = ParamColor("Title Color ",colorBlack);

if (NOT BKswitch)
{
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
}

cx = Param( "cxposn", 0, 0, 1250, 1 );
cy = Param( "cyposn", 112, 0, 500, 1 );
GfxSelectFont( "Candara", 18, 98, False );
GfxSetBkColor( colorBlack );
GfxSetTextColor( colorWhite );
GfxTextOut( "L.T.P. " + C + " ", cx, cy );
 
Last edited:

extremist

Well-Known Member
Thanks Extremist Bro for your kind reply..
Thanks for remove my confusion..
Yes, You are right, Actually I need Pure Stochastic indicator in OHLC (Stochastic in candlestick form)
Stochastic K%...
Thanks....
-tk
:)
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 );
 

Nehal_s143

Well-Known Member
Fly candles image suggest there is deviation between the price, will try to check once new image of fly candle is posted in FB group

Does the fly candles represent exact price or there is deviation between the price (candle stick charts) vs fly candle as mentioned above ?
http://tradecatcher.blogspot.in/2014/01/swing-trading-system-v-20-amibroker-afl.html

Code:
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,colorGreen);
Plot(MA(HaClose,a),"", color20,styleThick);

Color=IIf(Haclose>MA(HaClose,a),colorGreen, colorRed);
PlotOHLC( HaOpen, HaOpen, HaClose, HaClose, "" + Name(), Color, styleCandle);
_SECTION_END();

_SECTION_BEGIN("Priyanvada's Price Action");
P = ParamField( "Price field" );
CandleT=ParamToggle("Candlestick Display","No|Yes",defaultval=1 ); 
BarT=ParamToggle("Bar Display","No|Yes",defaultval=0 );
LineT=ParamToggle("Line Display","No|Yes",defaultval=0 );
//T3MA toggle
T3MAT=ParamToggle("Moving Average","No|Yes",defaultval=1 ); 
//T3MA Check Periods
T3MAP = Param("T3MA Periods", 46, 2, 300, 1, 10 );

function T3(price,periods)
{
s = 0.84;
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
T3MA = T3(P,T3MAP);
for( i = 1; i < BarCount; i++ ) 
{
//assignments
NvadaOpen[i] = Close[i-1];
NvadaClose[i]=Close[i];
NvadaHigh[i]=IIf(NvadaOpen[i]>=NvadaClose[i],NvadaOpen[i],NvadaClose[i]);
NvadaLow[i]=IIf(NvadaOpen[i]>=NvadaClose[i],NvadaClose[i],NvadaOpen[i]);
averagechange[i]=(NvadaOpen[i]+NvadaClose[i])/2;

//=============================
//CHECKS

//check1= uptrend and upbar as referred for last 2 bars
Check1[i]=averagechange[i]>T3MA[i] AND NvadaClose[i]>=NvadaOpen[i-2];
//check2= uptrend and downbar as referred for last 2 bars
Check2[i]=averagechange[i]>T3MA[i] AND NvadaClose[i]<NvadaOpen[i-2];

//check3= downtrend and downbar as referred for last 2 bars
Check3[i]=averagechange[i]<T3MA[i] AND NvadaClose[i]<=NvadaOpen[i-2];
//check4= downtrend and upbar as referred for last 2 bars
Check4[i]=averagechange[i]<T3MA[i] AND NvadaClose[i]>NvadaOpen[i-2];

//check5=check2 or check 4 => possible corrections!
Check5[i]=Check2[i] OR Check4[i];

//Color assignment
if(Check1[i]==1){pricolor[i] =colorGreen;}
if(Check3[i]==1){pricolor[i] =colorRed;}
if(Check5[i]==1){pricolor[i] =colorYellow;}
//Pricolor = IIf(NvadaClose>Ref(NvadaOpen,-2),colorGreen,colorRed);
}



//T3MA Display
if(T3MAT==1)
{
T3MAcolor = IIf(C>=T3MA,colorGreen,colorRed);
Plot(T3MA,"T3MA",T3MAcolor,styleThick);
}
Buy=T3MAcolor==colorGreen;
Sell=T3MAcolor==colorRed;
Short=Sell;
Cover=Buy;

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

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy , shapeUpArrow, shapeNone),colorWhite); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorYellow);
no=Param( "Swing", 12, 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);


Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase);




SetPositionSize(300,spsShares);
ApplyStop(0,1,10,1);
//-----------end--------------
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)+"",""));
_SECTION_END();


H1 = SelectedValue( TimeFrameGetPrice( "H", inDaily, -1 ) );
L1 = SelectedValue( TimeFrameGetPrice( "L", inDaily, -1 ) );
C1 = SelectedValue( TimeFrameGetPrice( "C", inDaily, -1 ) );
H2 = SelectedValue( TimeFrameGetPrice( "H", inDaily, 0 ) );
L2 = SelectedValue( TimeFrameGetPrice( "L", inDaily, 0 ) );
O1 = SelectedValue( TimeFrameGetPrice( "open", inDaily, 0 ) );
F4 = 0;
D1 = ( H1 - L1 );
D2 = ( H2 - L2 );
F1 = D1 * 0.433;
F2 = D1 * 0.766;
F3 = D1 * 1.35;
if ( D2 <= F1 )
    F4 = F1;
else
    if ( D2 <= F2  )
        F4 = F2;
    else
        F4 = F3;

S_P = ( O1 - F4 );

B_P = ( O1 + F4 );

BP = ( L2 + F4 );

BPTGT = ( BP + ( BP * .0065 ) );//.0015 brokerage

BPSTPLS = ( BP - ( BP * .0085 ) );

SP = ( H2 - F4 );

SPTGT = ( SP - ( SP * .0065 ) );

SPSTPLS = ( SP + ( SP * .0085 ) );


p = ( H1 + L1 + C1 ) / 3;

s1 = ( H1 );

r1 = ( L1 );

r2 = SelectedValue( L2 );

s2 = SelectedValue( H2 );
Filter =  Buy OR Sell;

AddColumn( IIf( Buy, 66, 1 ), "Buy", formatChar, 1, bkcolor = IIf( Buy, 43, 33 ) );

AddColumn( IIf( Sell, 83, 1 ), "Sell", formatChar, 1, bkcolor = IIf( Sell, 25, 32 ) );

AddColumn( IIf( Short, 83, 1 ), "Short", formatChar, 1, bkcolor = IIf( Short, 25, 32 ) );

AddColumn( C, "CMP", 1.2, colorDefault, colorLightBlue );

AddColumn( BP, "SELL PRICE", 1.2, colorDefault, colorGreen );

AddColumn( BPTGT, "TGT PRICE", 1.2, colorDefault, colorBrown );

AddColumn( BPSTPLS, "STPLS BUY", 1.2, colorDefault, colorRed );

AddColumn( p, "PIVOT", 1.2, colorDefault, colorYellow );

AddColumn( SPSTPLS, "STPLS SELL", 1.2, colorDefault, colorRed );

AddColumn( SP, "SELL PRICE", 1.2, colorDefault, colorGreen );

AddColumn( SPTGT, "TGT PRICE", 1.2, colorDefault, colorBrown );


AddColumn( H1, "PRE-HIGH" );

AddColumn( L1, "PRE-LOW" );

AddColumn( D1, "PRE-DIFF" );

AddColumn( F1, "0.433" );

AddColumn( F2, "0.766" );

AddColumn( F3, "1.35" );

AddColumn( H2, "D-HIGH" );

AddColumn( L2, "D-LOW" );

AddColumn( D2, "D-DIFF" );

AddColumn( F4, "SELECT FACT" );
_SECTION_END();
//============== TITLE ==============
_SECTION_BEGIN("Title");
if( Status("action") == actionIndicator ) 
(
Title = EncodeColor(colorGold)+ "K T S" + EncodeColor(colorRose)+" (" +  Name() + ") " + EncodeColor(colorGold)+ Interval(2) + 
 "  " + Date() +" " +" •  Open "+WriteVal(O,1.000)+"  •  "+"Hi "+WriteVal(H,1.000)+"  •  "+"Lo "+WriteVal(L,1.000)+"  •  "+
"Close "+WriteVal(C,1.000)+" ("+WriteVal(C-Ref(C,-1),1,0)+" "+WriteVal((C-Ref(C,-1))*100/Ref(C,-1),1.1)+ "%)  •  Vol= "+ WriteVal(V,1.0)
 


+"\n"+EncodeColor(colorGrey50)+"------------------------------------------------------------------------------------------------------------"

+"\n"+EncodeColor(colorGold)+
WriteIf (Buy , "Signal: Go Long - Entry Price: "+WriteVal(C)+" - Traget: "+WriteVal((BuyPrice+tsl)+BuyPrice)
+" - StopLoss:"+WriteVal(tsl)+"  "
,"")+


WriteIf (Sell , "Signal: Go Short - Entry Price: "+WriteVal(C)+" - Target: "+WriteVal((tsl-SellPrice)-SellPrice)+" - StopLoss:"+WriteVal(tsl)+" ","")+
EncodeColor(ColorRGB(111,208,255))+
WriteIf(Long AND NOT Buy, "Trade: Long - Entry Price: "+WriteVal((BuyPrice))+" - Profit: "+WriteVal((C-BuyPrice))+" "+EncodeColor(colorLime)+"Let your profit runs!","")+
WriteIf(shrt AND NOT Sell, "Trade: Short - Entry Price: "+WriteVal((SellPrice))+" - Profit: "+WriteVal((SellPrice-C))+"  - "+EncodeColor(colorLime)+"Let your profit runs!","")

+"\n"+EncodeColor(colorGrey50)+"------------------------------------------------------------------------------------------------------------"
);

dist = 6*ATR(10);
dist1 = 6*ATR(10);
for( i = 0; i < BarCount; i++) 
{ 
 if( Buy[i] ) 
 {
  PlotText( "Buy:" + C[ i ] + "\nT= " + tsl[i] + "\nSL= " +((C[i]-tsl[i])+C[i]) , i, C[ i ]-dist[i], colorGreen, colorDarkOliveGreen );
 }
 if( Sell[i] )
 {
  PlotText( "Sell:" + C[ i ] + "\nT= " + (C[i]-(tsl[i]-C[i]))  + "\nSL= " +tsl[i], i, C[ i ]+dist1[i], colorRed, colorDarkOliveGreen ); 
 }
}




/*Plot Ribbon */
Ribbon1=IIf(  (C) >(tsl)  ,colorWhite, IIf(( tsl )>( C ), colorOrange,colorYellow));
Plot(3, "Ribbon", Ribbon1, styleOwnScale| styleArea| styleNoLabel,-0.5,100);

_SECTION_END();

_SECTION_BEGIN("Background text");
BKswitch = ParamToggle("Background Color","On,Off");

OUTcolor = ParamColor("Outer Panel Color",colorTeal);
INUPcolor = ParamColor("Inner Panel Upper",colorDarkTeal);
INDNcolor = ParamColor("Inner Panel Lower",colorPlum);
TitleColor = ParamColor("Title Color ",colorBlack);

if (NOT BKswitch)
{
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
}

cx = Param( "cxposn", 0, 0, 1250, 1 );
cy = Param( "cyposn", 112, 0, 500, 1 );
GfxSelectFont( "Candara", 18, 98, False );
GfxSetBkColor( colorBlack );
GfxSetTextColor( colorWhite );
GfxTextOut( "L.T.P.  " + C + " ", cx, cy );
 

amitrandive

Well-Known Member
Fly candles image suggest there is deviation between the price, will try to check once new image of fly candle is posted in FB group
Nehal

One friendly advice, do not keep looking for the Holy Grail.

I will tell you , even if you get this indicator right ,your search will keep on continuing for the next best one and on and on.It never ends.

Just imagine about the people who are having this indicator.Do you think they are profiting from trading by using this indicator?

Nobody sells a winning system.

Just concentrate on your existing system.

A beautiful quote for you to understand this.

 
hi

when replying to your PM i got error saying "jitensingh has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her."
sir i dont know to activate this pm message option
i have send again u a pm pls revert me
thanks
 

Similar threads