Need to Plot ATP ( Average Traded Price ) on the Graph

#1
Hi Seniors and Members ,


Need help of the above topic i.e.,

AFL needed for ATP price to be plotted on the graph .

Also need Buy and Sell signal with ATP price ...

If price closes above ATP price its a BUY . and..

If price closes below ATP price its a SELL ..


Thanks in advance,
Kumar
 
#2
Mr.Kumar

I am having only ATP afl, any seniors can add buy n sell signals



_SECTION_BEGIN("ATP");
B=Volume;
A=Avg;
Value=B*A;
Barsfromtodaybegin = 1 + BarsSince( Day() != Ref(Day(), -1));
Totalvalue=Sum(Value,Barsfromtodaybegin);
Totalvolume=Sum(V,Barsfromtodaybegin);
ATP=(Totalvalue/Totalvolume);
ColorATP=IIf(ATP>Ref(ATP,-1),colorBrightGreen,colorRed);
Plot(ATP,"ATP",colorATP,styleThick);
_SECTION_END();
 

casoni

Well-Known Member
#3
Mr.Kumar

I am having only ATP afl, any seniors can add buy n sell signals



_SECTION_BEGIN("ATP");
B=Volume;
A=Avg;
Value=B*A;
Barsfromtodaybegin = 1 + BarsSince( Day() != Ref(Day(), -1));
Totalvalue=Sum(Value,Barsfromtodaybegin);
Totalvolume=Sum(V,Barsfromtodaybegin);
ATP=(Totalvalue/Totalvolume);
ColorATP=IIf(ATP>Ref(ATP,-1),colorBrightGreen,colorRed);
Plot(ATP,"ATP",colorATP,styleThick);
_SECTION_END();
add this

plot(c,"",3,64);
Buy =Cross(C,atp);
Sell=Cross(atp,C);
PlotShapes(shapeUpArrow*Buy,5,0,L,-10);
PlotShapes(shapeDownArrow*Sell,4,0,H,-10);
 

TraderRavi

Gayi Bhains Pani Mein
#4
Mr.Kumar

I am having only ATP afl, any seniors can add buy n sell signals



_SECTION_BEGIN("ATP");
B=Volume;
A=Avg;
Value=B*A;
Barsfromtodaybegin = 1 + BarsSince( Day() != Ref(Day(), -1));
Totalvalue=Sum(Value,Barsfromtodaybegin);
Totalvolume=Sum(V,Barsfromtodaybegin);
ATP=(Totalvalue/Totalvolume);
ColorATP=IIf(ATP>Ref(ATP,-1),colorBrightGreen,colorRed);
Plot(ATP,"ATP",colorATP,styleThick);
_SECTION_END();
thanks for ATP AFL........:thumb:
 
#7
two more ways to use this :thumb:

For reducing whipsaws, can introduce a lag to the signal by using MA of C.
Code:
plot(c,"",3,64);
Buy =Cross(MA(C,6),atp);
Sell=Cross(atp,MA(C,6));
PlotShapes(shapeUpArrow*Buy,5,0,L,-10);
PlotShapes(shapeDownArrow*Sell,4,0,H,-10);
Another way to introduce Lag, is to wait for the full bar to be above/below ATP Line
Code:
plot(c,"",3,64);
Buy =Cross(L,atp);
Sell=Cross(atp,H);
PlotShapes(shapeUpArrow*Buy,5,0,L,-10);
PlotShapes(shapeDownArrow*Sell,4,0,H,-10);

Thanks:thumb:

Thank you sir.. SO here you are using MA of 6 days... any reason for 6 days??
 

Similar threads

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?