Help needed - plz Add BUy sell - Urgent

#1
Dear friends ...

Plz add buy sell signal for the bellow Afl ..

Conditions :

Buy signal should come while candle close above " BA " Line ... ( Buy Above )

Sell signal should come while candle close bellow " SB " Line ... ( Sell Bellow )

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


AFL code :::::::







_SECTION_BEGIN("Buy Sell");


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );





tO = TimeFrameGetPrice("O", inDaily);

BA=((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);




Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);


Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);


Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);


Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);


Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);

Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);


Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);

Plot(BB, "BB",colorYellow,styleNoLine);


_SECTION_END();
 

amitrandive

Well-Known Member
#2
Dear friends ...

Plz add buy sell signal for the bellow Afl ..

Conditions :

Buy signal should come while candle close above " BA " Line ... ( Buy Above )

Sell signal should come while candle close bellow " SB " Line ... ( Sell Bellow )

.
.
.
.

Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);


Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);

Plot(BB, "BB",colorYellow,styleNoLine);


_SECTION_END();

Added Buy/Sell arrows and also exploration for Buy/Sell.
:thumb:

Code:
_SECTION_BEGIN("Buy Sell");


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );





tO = TimeFrameGetPrice("O", inDaily);

BA=((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);




Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);


Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);


Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);


Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);


Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);

Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);


Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);

Plot(BB, "BB",colorYellow,styleNoLine);
Buy=C>BA;
Sell=C<SB;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy ); 
shape =Buy * shapeUpArrow +Sell * shapeDownArrow;
PlotShapes( shape, IIf(Buy, colorLime, colorRed ), 0, IIf(Buy, Low, High));

Filter=Buy OR Sell;
AddColumn(Close,"CMP ",1.2);
AddColumn(Buy,"Buy",1.0);
AddColumn(Sell,"Sell",1.0);

_SECTION_END();
 
#3

Added Buy/Sell arrows and also exploration for Buy/Sell.
:thumb:

Code:
_SECTION_BEGIN("Buy Sell");


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );





tO = TimeFrameGetPrice("O", inDaily);

BA=((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);




Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);


Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);


Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);


Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);


Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);

Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);


Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);

Plot(BB, "BB",colorYellow,styleNoLine);
Buy=C>BA;
Sell=C<SB;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy ); 
shape =Buy * shapeUpArrow +Sell * shapeDownArrow;
PlotShapes( shape, IIf(Buy, colorLime, colorRed ), 0, IIf(Buy, Low, High));

Filter=Buy OR Sell;
AddColumn(Close,"CMP ",1.2);
AddColumn(Buy,"Buy",1.0);
AddColumn(Sell,"Sell",1.0);

_SECTION_END();



Wow ..... Thanks a lot sir .... Thank u very much ....
 
#4

Added Buy/Sell arrows and also exploration for Buy/Sell.
:thumb:

Code:
_SECTION_BEGIN("Buy Sell");


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );





tO = TimeFrameGetPrice("O", inDaily);

BA=((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);




Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);


Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);


Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);


Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);


Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);

Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);


Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);

Plot(BB, "BB",colorYellow,styleNoLine);
Buy=C>BA;
Sell=C<SB;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy ); 
shape =Buy * shapeUpArrow +Sell * shapeDownArrow;
PlotShapes( shape, IIf(Buy, colorLime, colorRed ), 0, IIf(Buy, Low, High));

Filter=Buy OR Sell;
AddColumn(Close,"CMP ",1.2);
AddColumn(Buy,"Buy",1.0);
AddColumn(Sell,"Sell",1.0);

_SECTION_END();


Sir ...


i need another help from u sir ...

1 ) My formula code value for BA , SB and others shows in Decimal value like 404.26 or 404.85 ........ can u make it round off value like 404 or 405....


2 ) The buy or sell signal should close that day itself sir .. should not continue for next day .....Here Signal continues next day till next signal appears ... ...... next day signal should be fresh Buy or Sell according to formula .....

3 ) And also plz make those arrows little bigger for comfort visibility sir ( white arrow in Green or Red box ) :):)



Plz help me sir ... Thanks ...
 
Last edited:

amitrandive

Well-Known Member
#5
Sir ...


i need another help from u sir ...

1 ) My formula code value for BA , SB and others shows in Decimal value like 404.26 or 404.85 ........ can u make it round off value like 404 or 405....


2 ) The buy or sell signal should close that day itself sir .. should not continue for next day .....Here Signal continues next day till next signal appears ... ...... next day signal should be fresh Buy or Sell according to formula .....

3 ) And also plz make those arrows little bigger for comfort visibility sir ( white arrow in Green or Red box ) :):)



Plz help me sir ... Thanks ...
Code modified for Rounding off values and better arrows.
Do not know how to increase arrow size.
Will try and modify for 2nd requirement later.


Code:
_SECTION_BEGIN("Buy Sell");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );

tO = TimeFrameGetPrice("O", inDaily);

BA=ceil((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=ceil(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=ceil((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=ceil(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=ceil((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=ceil(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=ceil((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=ceil(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=ceil(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=ceil(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);

Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);
Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);
Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);
Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);
Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);
Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);
Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);
Plot(BB, "BB",colorYellow,styleNoLine);
Buy=C>BA;
Sell=C<SB;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy ); 
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, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
//shape =Buy * shapeUpArrow +Sell * shapeDownArrow;
//PlotShapes( shape, IIf(Buy, colorLime, colorRed ), 0, IIf(Buy, Low, High));

Filter=Buy OR Sell;
AddColumn(Close,"CMP ",1.2);
AddColumn(Buy,"Buy",1.0);
AddColumn(Sell,"Sell",1.0);

_SECTION_END();
 

amitrandive

Well-Known Member
#6
Entire code complete.Change time requirements from parameters
:thumb:

Code:
TimeRange = ParamToggle("Time","No|Yes");
Starttime = Param("Starttime",092000,092000,152500,0);
Closetime = Param("Closetime",152500,092000,152500,0);
ExitToday = (Ref(DateNum(),1) > DateNum());

 _SECTION_BEGIN("Buy Sell");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );

tO = TimeFrameGetPrice("O", inDaily);

BA=ceil((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=ceil(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=ceil((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=ceil(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=ceil((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=ceil(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=ceil((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=ceil(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=ceil(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=ceil(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);

Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);
Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);
Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);
Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);
Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);
Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);
Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);
Plot(BB, "BB",colorYellow,styleNoLine);
//Buy=C>BA;
//Sell=C<SB;
//Buy = ExRem( Buy, Sell );
//Sell = ExRem( Sell, Buy ); 
B1 =C>BA;
S1 = C<SB;
Sh1 = C<SB;
Co1 = C>BA;
Buy = IIf(TimeRange==False,B1,B1 AND TimeNum() > Starttime AND TimeNum() < Closetime);
Sell = IIf(TimeRange==False,S1,S1 OR TimeNum() > Closetime OR ExitToday);
Short = IIf(Timerange==False,Sh1,Sh1 AND TimeNum() > Starttime AND TimeNum() < Closetime);
Cover = IIf(Timerange==False,Co1,Co1 OR TimeNum() > Closetime OR ExitToday);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
//PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-20);
//PlotShapes(IIf(Sell==1, shapeStar, shapeNone), colorRed, 0,High, Offset=30);
//PlotShapes(IIf(Short==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-20);
//PlotShapes(IIf(Cover==1, shapeStar, shapeNone), colorGreen, 0,Low, Offset=-30);
//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(Cover, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Cover, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 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);
//shape =Buy * shapeUpArrow +Sell * shapeDownArrow;
//PlotShapes( shape, IIf(Buy, colorLime, colorRed ), 0, IIf(Buy, Low, High));

Filter=Buy OR Sell;
AddColumn(Close,"CMP ",1.2);
AddColumn(Buy,"Buy",1.0);
AddColumn(Sell,"Sell",1.0);

_SECTION_END();
 
#7
Entire code complete.Change time requirements from parameters
:thumb:

Code:
TimeRange = ParamToggle("Time","No|Yes");
Starttime = Param("Starttime",092000,092000,152500,0);
Closetime = Param("Closetime",152500,092000,152500,0);
ExitToday = (Ref(DateNum(),1) > DateNum());

 _SECTION_BEGIN("Buy Sell");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = EncodeColor(colorRed)+ "www.bstarplus.com " + 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() );

tO = TimeFrameGetPrice("O", inDaily);

BA=ceil((tO*.236/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);

SB=ceil(tO-(tO*.236/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT1=ceil((tO*.455/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST1=ceil(tO-(tO*.455/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT2=ceil((tO*.786/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST2=ceil(tO-(tO*.786/100));
DayO = TimeFrameGetPrice("O", inDaily);

BT3=ceil((tO*1/100)+tO);
DayO = TimeFrameGetPrice("O", inDaily);


ST3=ceil(tO-(tO*1/100));
DayO = TimeFrameGetPrice("O", inDaily);

BB=ceil(BA+3);
DayO = TimeFrameGetPrice("O", inDaily);

SS=ceil(SB-3);
DayO = TimeFrameGetPrice("O", inDaily);

Plot(BA, "BUY ABOVE",colorGreen,styleLine);
Plot(SB, "SELL BELOW",colorRed,styleLine);
Plot(to, "Daily open",colorBlack,styleDots+styleNoLine);
Plot(BB, "BB",colorYellow,styleLine);
Plot(SS, "SS",colorYellow,styleLine);
Plot(BT1, "BUY TARGET1",colorBlue,styleLine+styleNoTitle);
Plot(ST1, "SELL TARGET1",colorDarkRed,styleLine|styleNoTitle);
Plot(BT2, "BUY TARGET2",colorBlue,styleLine|styleNoTitle);
Plot(ST2, "SELL TARGET2",colorDarkRed,styleLine|styleNoTitle);
Plot(BT3, "BUY TARGET3",colorBlue,styleLine|styleNoTitle);
Plot(ST3, "SELL TARGET3",colorDarkRed,styleLine|styleNoTitle);
Plot(BB, "BB",colorYellow,styleNoLine);
//Buy=C>BA;
//Sell=C<SB;
//Buy = ExRem( Buy, Sell );
//Sell = ExRem( Sell, Buy ); 
B1 =C>BA;
S1 = C<SB;
Sh1 = C<SB;
Co1 = C>BA;
Buy = IIf(TimeRange==False,B1,B1 AND TimeNum() > Starttime AND TimeNum() < Closetime);
Sell = IIf(TimeRange==False,S1,S1 OR TimeNum() > Closetime OR ExitToday);
Short = IIf(Timerange==False,Sh1,Sh1 AND TimeNum() > Starttime AND TimeNum() < Closetime);
Cover = IIf(Timerange==False,Co1,Co1 OR TimeNum() > Closetime OR ExitToday);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
//PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-20);
//PlotShapes(IIf(Sell==1, shapeStar, shapeNone), colorRed, 0,High, Offset=30);
//PlotShapes(IIf(Short==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-20);
//PlotShapes(IIf(Cover==1, shapeStar, shapeNone), colorGreen, 0,Low, Offset=-30);
//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(Cover, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Cover, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 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);
//shape =Buy * shapeUpArrow +Sell * shapeDownArrow;
//PlotShapes( shape, IIf(Buy, colorLime, colorRed ), 0, IIf(Buy, Low, High));

Filter=Buy OR Sell;
AddColumn(Close,"CMP ",1.2);
AddColumn(Buy,"Buy",1.0);
AddColumn(Sell,"Sell",1.0);

_SECTION_END();





Thanks for ur effort sir ....

Regarding time .... if the time option is " yes " then the arrows changes and showing wrong indications mainly in selling arrow sir ..... plz check once sir ...
 

amitrandive

Well-Known Member
#8
Thanks for ur effort sir ....

Regarding time .... if the time option is " yes " then the arrows changes and showing wrong indications mainly in selling arrow sir ..... plz check once sir ...
bluesquare

Can you show some snapshots where the error occurs?
This seems fine to me.

If you click the time option, irrespective of your position short/long , you will be stopped out at the end of the day.
 
#9
bluesquare

Can you show some snapshots where the error occurs?
This seems fine to me.

If you click the time option, irrespective of your position short/long , you will be stopped out at the end of the day.


Snapshots ready sir .... but couldnt attach here ... plz pm me ur mail address ll send u screen shot ..:confused::confused::confused:
 

Similar threads