Dear all
Here i am starting this thread for the benefit of all and welcoming all
GOAL is to get BEST
All seniors and guru's of this family
please pay attention and please guide for the best
who ever helping to make this ...will stay in hearts of all beneficiaries for ever
before coming to the exact point let me introduce one moral
if we want go get good crop we must put a good seed in good ground with good support,care ......then only it will possible
in the same way we need to put good seed (stratagy ,AFL ) in a good ground (trending time ) need to give good support (indicators )good care (stop loss) and consistency ......then only we can get ,,,,,hope you got my thought
with out support of senior gurus this will not possible .....so please help in this to help all
here i want to set a back ground for this in the form of questions and the answers for these questions will lead to the path, if any body wants to add more things for the betterment ,you are hearty welcome
questions are
1) best time to enter in to ( trending market time ) how to know the trending time ?
2) best seed ( AFL, Indicators ) to use ....what is that ?
3) best point to buy / sell how to know ?
4) best point to come out ( stop loss ) where to keep ?
5) best place to choose ( which script is trending ) ?
i feel that answers to these 5 questions will give a way to the best ( at lease better )
please through light on these questions give guidance and get answers
all seniors and gurus and knowledge banks can give valuable suggestions and guidance .....welcome all
with the above introduction i will request one of the senior to come forward and take over this thread and go ahead ........because i know, i am not right person to handle this as i am new to this field and i am doctor by profession
if not all the above
here i am posting an AFL from my respected senior
can make betterment of this ........so that we can get even better
_SECTION_BEGIN("Strategy 1");
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() );
SARacc = Param( "SAR Accelration", 0.03, 0.01, 0.2, 0.01 );
SARmacc = Param( "SAR Max Accelration", 0.2, 0.01, 0.5, 0.01 );
percs = Param( "Trail Stop Loss Percentage", 1, 0, 90, 0.1 );
perct= Param( "Proft Target Percentage", 1, 0, 90, 0.1 );
SAR1= SAR(SARacc, SARmacc);
Plot( SAR1, "SAR", colorRed, styleDots | styleNoLine, maskDefault );
Buy1 = Cross( H, SAR1 );
Sell1 = Cross( SAR1, L );
Buy = Buy1;
BuyPrice= ValueWhen(Buy, C);
sl = HHV( H, BarsSince( Buy ) ) * ( 1 - percs/ 100 );
tgt= ValueWhen(Buy, C)* (1 + perct/100);
sl= 0.05*int( (100*sl)/5);
tgt= 0.05*int( (100*tgt)/5);
Sell = ( Sell1 OR L < sl OR H>tgt) AND ( H - L ) < C * ( percs / 100 );
printf("SAR"+ tgt );
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
BuyPrice = 0.05*int( (100*ValueWhen( Buy, C ))/5 ) ;
SellPrice = IIf( Sell AND L < sl, sl, IIf(Sell AND H> tgt, tgt, ValueWhen( Sell, O )) );
Short = Sell1;
ShortPrice= ValueWhen(Short, C);
sls = LLV( L, BarsSince( Short ) ) * ( 1 + percs / 100 );
tgts= ValueWhen(Short, C)* (1 - perct/100);
sls= 0.05*int( (100*sls)/5);
tgts= 0.05*int( (100*tgts)/5);
Cover = ( Buy1 OR H > sls OR L<tgts ) AND ( H - L ) < C * ( percs / 100 );
Short = ExRem( Short, Cover );
Cover = ExRem( Cover, Short );
ShortPrice = ValueWhen( Short, C );
CoverPrice = IIf( Cover AND H > sls, sls, IIf( Cover AND L<tgts, tgt, ValueWhen( Cover, O )) );
sig = IIf( BarsSince( Buy ) < BarsSince( Short ), 1, 0 );
messageboard = ParamToggle( "Message Board", "Show|Hide", 1 );
if ( messageboard == 1 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
GfxSelectSolidBrush( colorDarkTeal ); // 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 - 98, x2, y , 7, 7 ) ;
GfxTextOut( ( " " ), 27, y - 120 );
GfxTextOut( ( "Last" + " Signal came " + ( BarsSince( Buy OR Short ) ) * Interval() / 60 + " mins ago" ), 13, y - 100 ) ; // The text format location
GfxTextOut( ( "" + WriteIf( sig == 1, "BUY @ " + BuyPrice , "SHORT @ " + ShortPrice ) ), 13, y - 80 );
GfxTextOut( "Stop Loss : " + IIf( sig == 1, sl, sls ), 13, y - 60 );
GfxTextOut( "Target : " + IIf( sig == 1, tgt, tgts ), 13, y - 40 );
GfxTextOut( ( "Current P/L : " + WriteVal( IIf( sig == 1, ( C - BuyPrice ), ( ShortPrice - C ) ), 2.2 ) ), 13, y - 22 );
}
PlotShapes( IIf( Buy, shapeSquare, shapeNone ), colorGreen, 0, L, Offset = -40 );
PlotShapes( IIf( Buy, shapeSquare, shapeNone ), colorLime, 0, L, Offset = -50 );
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), colorWhite, 0, L, Offset = -45 );
PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), colorRed, 0, H, Offset = -45 );
PlotShapes( IIf( Short, shapeSquare, shapeNone ), colorRed, 0, H, Offset = 40 );
PlotShapes( IIf( Short, shapeSquare, shapeNone ), colorOrange, 0, H, Offset = 50 );
PlotShapes( IIf( Short, shapeDownArrow, shapeNone ), colorWhite, 0, H, Offset = -45 );
PlotShapes( IIf( Cover, shapeUpArrow, shapeNone ), colorBlue, 0, L, Offset = -45 );
Filter= Buy OR Sell OR Short OR Cover;
AddColumn(C, "Price");
AddColumn(Buy, "BUY", 1.0, colorWhite, IIf(Buy, ColorRGB(0,102,0), colorWhite), 50);
AddColumn(Sell, "SELL", 1.0, IIf(Sell, colorBlack, colorWhite), IIf(Sell, ColorRGB(255,204,204), colorWhite), 50);
AddColumn(Short, "SHORT", 1.0, colorWhite, IIf(Short, ColorRGB(153,0,0), colorWhite), 50);
AddColumn(Cover, "COVER", 1.0, IIf(Cover, colorBlack, colorWhite), IIf(Cover, ColorRGB(153,255,153), colorWhite), 50);
Here i am starting this thread for the benefit of all and welcoming all
GOAL is to get BEST
All seniors and guru's of this family
please pay attention and please guide for the best
who ever helping to make this ...will stay in hearts of all beneficiaries for ever
before coming to the exact point let me introduce one moral
if we want go get good crop we must put a good seed in good ground with good support,care ......then only it will possible
in the same way we need to put good seed (stratagy ,AFL ) in a good ground (trending time ) need to give good support (indicators )good care (stop loss) and consistency ......then only we can get ,,,,,hope you got my thought
with out support of senior gurus this will not possible .....so please help in this to help all
here i want to set a back ground for this in the form of questions and the answers for these questions will lead to the path, if any body wants to add more things for the betterment ,you are hearty welcome
questions are
1) best time to enter in to ( trending market time ) how to know the trending time ?
2) best seed ( AFL, Indicators ) to use ....what is that ?
3) best point to buy / sell how to know ?
4) best point to come out ( stop loss ) where to keep ?
5) best place to choose ( which script is trending ) ?
i feel that answers to these 5 questions will give a way to the best ( at lease better )
please through light on these questions give guidance and get answers
all seniors and gurus and knowledge banks can give valuable suggestions and guidance .....welcome all
with the above introduction i will request one of the senior to come forward and take over this thread and go ahead ........because i know, i am not right person to handle this as i am new to this field and i am doctor by profession
if not all the above
here i am posting an AFL from my respected senior
can make betterment of this ........so that we can get even better
_SECTION_BEGIN("Strategy 1");
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() );
SARacc = Param( "SAR Accelration", 0.03, 0.01, 0.2, 0.01 );
SARmacc = Param( "SAR Max Accelration", 0.2, 0.01, 0.5, 0.01 );
percs = Param( "Trail Stop Loss Percentage", 1, 0, 90, 0.1 );
perct= Param( "Proft Target Percentage", 1, 0, 90, 0.1 );
SAR1= SAR(SARacc, SARmacc);
Plot( SAR1, "SAR", colorRed, styleDots | styleNoLine, maskDefault );
Buy1 = Cross( H, SAR1 );
Sell1 = Cross( SAR1, L );
Buy = Buy1;
BuyPrice= ValueWhen(Buy, C);
sl = HHV( H, BarsSince( Buy ) ) * ( 1 - percs/ 100 );
tgt= ValueWhen(Buy, C)* (1 + perct/100);
sl= 0.05*int( (100*sl)/5);
tgt= 0.05*int( (100*tgt)/5);
Sell = ( Sell1 OR L < sl OR H>tgt) AND ( H - L ) < C * ( percs / 100 );
printf("SAR"+ tgt );
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
BuyPrice = 0.05*int( (100*ValueWhen( Buy, C ))/5 ) ;
SellPrice = IIf( Sell AND L < sl, sl, IIf(Sell AND H> tgt, tgt, ValueWhen( Sell, O )) );
Short = Sell1;
ShortPrice= ValueWhen(Short, C);
sls = LLV( L, BarsSince( Short ) ) * ( 1 + percs / 100 );
tgts= ValueWhen(Short, C)* (1 - perct/100);
sls= 0.05*int( (100*sls)/5);
tgts= 0.05*int( (100*tgts)/5);
Cover = ( Buy1 OR H > sls OR L<tgts ) AND ( H - L ) < C * ( percs / 100 );
Short = ExRem( Short, Cover );
Cover = ExRem( Cover, Short );
ShortPrice = ValueWhen( Short, C );
CoverPrice = IIf( Cover AND H > sls, sls, IIf( Cover AND L<tgts, tgt, ValueWhen( Cover, O )) );
sig = IIf( BarsSince( Buy ) < BarsSince( Short ), 1, 0 );
messageboard = ParamToggle( "Message Board", "Show|Hide", 1 );
if ( messageboard == 1 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
GfxSelectSolidBrush( colorDarkTeal ); // 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 - 98, x2, y , 7, 7 ) ;
GfxTextOut( ( " " ), 27, y - 120 );
GfxTextOut( ( "Last" + " Signal came " + ( BarsSince( Buy OR Short ) ) * Interval() / 60 + " mins ago" ), 13, y - 100 ) ; // The text format location
GfxTextOut( ( "" + WriteIf( sig == 1, "BUY @ " + BuyPrice , "SHORT @ " + ShortPrice ) ), 13, y - 80 );
GfxTextOut( "Stop Loss : " + IIf( sig == 1, sl, sls ), 13, y - 60 );
GfxTextOut( "Target : " + IIf( sig == 1, tgt, tgts ), 13, y - 40 );
GfxTextOut( ( "Current P/L : " + WriteVal( IIf( sig == 1, ( C - BuyPrice ), ( ShortPrice - C ) ), 2.2 ) ), 13, y - 22 );
}
PlotShapes( IIf( Buy, shapeSquare, shapeNone ), colorGreen, 0, L, Offset = -40 );
PlotShapes( IIf( Buy, shapeSquare, shapeNone ), colorLime, 0, L, Offset = -50 );
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), colorWhite, 0, L, Offset = -45 );
PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), colorRed, 0, H, Offset = -45 );
PlotShapes( IIf( Short, shapeSquare, shapeNone ), colorRed, 0, H, Offset = 40 );
PlotShapes( IIf( Short, shapeSquare, shapeNone ), colorOrange, 0, H, Offset = 50 );
PlotShapes( IIf( Short, shapeDownArrow, shapeNone ), colorWhite, 0, H, Offset = -45 );
PlotShapes( IIf( Cover, shapeUpArrow, shapeNone ), colorBlue, 0, L, Offset = -45 );
Filter= Buy OR Sell OR Short OR Cover;
AddColumn(C, "Price");
AddColumn(Buy, "BUY", 1.0, colorWhite, IIf(Buy, ColorRGB(0,102,0), colorWhite), 50);
AddColumn(Sell, "SELL", 1.0, IIf(Sell, colorBlack, colorWhite), IIf(Sell, ColorRGB(255,204,204), colorWhite), 50);
AddColumn(Short, "SHORT", 1.0, colorWhite, IIf(Short, ColorRGB(153,0,0), colorWhite), 50);
AddColumn(Cover, "COVER", 1.0, IIf(Cover, colorBlack, colorWhite), IIf(Cover, ColorRGB(153,255,153), colorWhite), 50);
Last edited: