Karthiks Options Trading Strategy

yusi

Well-Known Member
Misread the chart, you were discussing values at the 10:45 M15 bar, and not the 12:00 bar :(

@pakatil, try this quickie:

1. In Nest2Ami Settings, enable TimeStamp M1 bar as xx:yy:59
2. Temporarity, change the output name of 6100PE to TEMP6100PE, say.
3. Backfill just this symbol
4. Compare charts of 6100PE and TEMP6100PE.

Do you see a difference?
 

pakatil

Well-Known Member
Misread the chart, you were discussing values at the 10:45 M15 bar, and not the 12:00 bar :(

@pakatil, try this quickie:

1. In Nest2Ami Settings, enable TimeStamp M1 bar as xx:yy:59
2. Temporarity, change the output name of 6100PE to TEMP6100PE, say.
3. Backfill just this symbol
4. Compare charts of 6100PE and TEMP6100PE.

Do you see a difference?
Dear Yusi.

Thank You for the valuable Inputs. Will check and come back.......during the day
 
_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("WMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( H, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("WMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( L, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();


a=WMA(H,5);
b=WMA(L,5);

Buy=Ref(C,-1)>Ref(a,-1) AND Ref(L,-1)>Ref(b,-1) AND C>Ref(H,-1) AND CCI(14)>50;
Sell=Ref(H,-1)<Ref(a,-1) AND Ref(C,-1)<Ref(b,-1) AND C<Ref(L,-1) AND CCI(14)<-50;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell,Buy);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-20);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-20);

for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy Above\n@" + H[i-1], i, L[ i ]-35, colorGreen,colorYellow );
if( Sell ) PlotText( "Sell Below\n@" + L[i-1], i, H[ i ]+35, colorRed, colorYellow );
}
 
_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("WMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( H, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("WMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( L, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();


a=WMA(H,5);
b=WMA(L,5);

Buy=Ref(C,-1)>Ref(a,-1) AND Ref(L,-1)>Ref(b,-1) AND C>Ref(H,-1) AND CCI(14)>50 AND CCI(14)<200;
Sell=Ref(H,-1)<Ref(a,-1) AND Ref(C,-1)<Ref(b,-1) AND C<Ref(L,-1) AND CCI(14)<-50;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell,Buy);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-20);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-20);

for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy Above\n@" + H[i-1], i, L[ i ]-35, colorGreen,colorYellow );
if( Sell ) PlotText( "Sell Below\n@" + L[i-1], i, H[ i ]+35, colorRed, colorYellow );
}



Dear Karthik, please check this code and comment.
 
Last edited:

karthik_sri

Well-Known Member
_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("WMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( H, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("WMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( L, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();


a=WMA(H,5);
b=WMA(L,5);

Buy=Ref(C,-1)>Ref(a,-1) AND Ref(L,-1)>Ref(b,-1) AND C>Ref(H,-1) AND CCI(14)>50;
Sell=Ref(H,-1)<Ref(a,-1) AND Ref(C,-1)<Ref(b,-1) AND C<Ref(L,-1) AND CCI(14)<-50;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell,Buy);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-20);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-20);

for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy Above\n@" + H[i-1], i, L[ i ]-35, colorGreen,colorYellow );
if( Sell ) PlotText( "Sell Below\n@" + L[i-1], i, H[ i ]+35, colorRed, colorYellow );
}


Hi Prakash,
Thanks for your effort.:) I feel some difference and triggers are not captured and one more thing if CCI is > 200 that should not give trigger. Please go through the first two pages to digest the concept.