Thoughts on Day/Swing Trading Part 2

Smart Ttraderji...

this is what i learn from the thread...

i guess this VWAP works on NIFTY futures only... i have my doubts....

it is a very good observation of market psychology....

only a pure trader could make this observation as your goodself did... amature would had thought of the exact opposite....

i also understand that when the diff is more than 20 points for example say closing price is more than 20 points from VWAP than take a long position at this point... move can give quick 10 to 15 points as per the price action... same true for opposite situation...

please confirm my observations... thank you...
 
well i have read quite a few pages now at least 20th page after the discussion on VWAP method was first started by you... one thing is for sure STji yous systems are simple but highly effective... could not find the VWAP afl... i think i will have more questions regarding this indicator.. but for that first i will need to start the live reading

anticipating that u will share the afl it shortly...

regards

hey STji i think i finally found the afl on page no 90 post 898... pls confirm if its the same afl...

here it is....

_SECTION_BEGIN("VWAP");
/*
Coded by Murthy
*/

TimeFrameSet( in1Minute);
BarsToday = 1 + BarsSince( Day() != Ref(Day(), -1));
StBar = ValueWhen(TimeNum() == 091500, BarIndex());
CumVol = Sum(V,BarsToday);
//IIf (BarIndex() >= StBar, VWAP = Sum (C * V, BarsToday ) / CumVol,0);
IIf (BarIndex() >= StBar, VWAP = Sum (((H+L+C)/3) * V, BarsToday ) / CumVol,0);
TimeFrameRestore();

ExcessPrice=C-VWAP;
Plot(ExcessPrice,"C-VWAP: ",IIf(excessprice>0,colorGreen,colorRed),styleHist ogram|styleThick);

Plot(35,"",colorRed,styleLine|styleNoLabel);
Plot(20,"",colorOrange,styleDashed|styleNoLabel);
Plot(-20,"",colorTeal,styleDashed|styleNoLabel);
Plot(-35,"",colorGreen,styleLine|styleNoLabel);
Plot(0,"",colorBlue,styleLine|styleNoLabel);


GfxSetTextColor(colorGreen);
GfxTextOut("Close : " + NumToStr( C, format = 1.2) ,0,20);
GfxTextOut("VWAP: " + NumToStr( VWAP, format = 1.2),0,40);


_SECTION_END();
 
Last edited:
Smart Ttraderji...

this is what i learn from the thread...

i guess this VWAP works on NIFTY futures only... i have my doubts....

it is a very good observation of market psychology....

only a pure trader could make this observation as your goodself did... amature would had thought of the exact opposite....

i also understand that when the diff is more than 20 points for example say closing price is more than 20 points from VWAP than take a long position at this point... move can give quick 10 to 15 points as per the price action... same true for opposite situation...

please confirm my observations... thank you...
Ritesh,

The difference has to be 35 points or above. I have found this 35 points work well with Nifty Futures and 80 points work with Bank nifty Futures. 20 points mentioned by you is too small, Nifty traders dont loose hope on 20 points difference. Also the difference has to be in the last 40-45 min. The basis of this pattern is that the loosing side should become panicky and run to cover their loosing positions and thereby extending the move.

I have traded this pattern for many years and I found that it works well on NF and BNF....on stocks you have to find out the difference which will make traders panicky by observing the charts.

But be careful with this pattern....I have seen people applying this pattern at 11:00 ....it is wrong...at 11:00 there is still lots of time left and no urgency to cover and loosing traders can afford to wait for a small correction. But at 3:00 the time is running out, losses mounting, the brokerages square off all loosing and leveraged positions. These are the ingradients of this pattern.:D

Smart_trade

Smart_trade
 
Totally aware abt these observations... As i said applying this to stock will be a task... But im definately up for the task.... Will try to post some findings... Obvsly withour your inputs i will be stalled... Please confirm the afl that i have posted.. Should i use this afl only for all of my trial and errors....

Thanks for the support....
 
Last edited:

murthyavr

Well-Known Member
Totally aware abt these observations... As i said applying this to stock will be a task... But im definately up for the task.... Will try to post some findings... Obvsly withour your inputs i will be stalled... Please confirm the afl that i have posted.. Should i use this afl only for all of my trial and errors....

Thanks for the support....
Yes Ritesh, you can use that afl referred to by you :)
 

pav

Active Member


Posting a 5 min Nifty Futures chart with TDST lines marked on it. When the market was in uptrend, the blue resistance lines were getting taken out, red support lines were successively higher.

When the trend is down, the reverse process takes place, market finds it difficult to break the successively lower blue resistance lines and it breaks successively lower red support lines.

Today also nifty futures found it difficult to cross blue resistance lines....but broke red support line and then came a free fall.

At around 3:00 the VWAP difference indicated that bears are in full control and bulls getting squeezed.....and that continued till the end and the bears really exploited the advantage they had over the trapped bulls.....and in the end there was a stampede of trapped bulls giving good prices for bears to cover their short positions.

Smart_trade

STsir,
from where i can get that TDST lines AFL ?

Regards
 
Posting TDST lines AFL. Drag it on the price charts and from Parameters say No to " show 1 to 8 numbers " and " Show TD Points ) this will plot TDST lines.


_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
ToolTip = "Open = " + O + "\nHigh = " + H + "\nLow = " + L + "\nClose = " + C;

_SECTION_END();

_SECTION_BEGIN("TD Systems");
// Parameters
ShowNumbers= ParamToggle("Show 1-8 Numbers","No|Yes", 1);
ShowTDPoints = ParamToggle("Show TD Points", "No|Yes", 1);
ShowTDST = ParamToggle("Show TD Setup Trend", "No|Yes", 1);
tdstsa = 0;
tdstba = 0;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//********************************************** TD Points********************************************************************/
function TD_Supply()
{
return ( H > Ref(H, 1) AND H > Ref(H, -1) AND H > Ref(C, -2));
}
function TD_Demand()
{
return ( L < Ref(L, 1) AND L < Ref(L, -1) AND L < Ref(C, -2));
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// *********************************************** TD Sequential************************************************************/
// *** Setup Buy Signal ***
//nine consecutive days closes less than the close four days earlier
Con = C < Ref( C, -4);
Buy9Bars = BarsSince(BarsSince(Con));
Buy9Signal = Buy9Bars == 9;

// *** Requirements ***
//The first day of the nine-day must be preceded by a close day immediately before it that is greater than OR equal to the Close four days earlier
Con = Ref(C, -9) >= Ref(C, -13);
Buy9Req = Buy9Signal AND Con;

// *** Intersection ***
// the high of either day 8 or day 9 is greater than or equal to the low three,four, five, six, OR seven days earlier
Con1 = (H >= Ref(L, -3)) OR ( Ref(H, -1) >= Ref(L, -3));
Con2 = (H >= Ref(L, -4)) OR ( Ref(H, -1) >= Ref(L, -4));
Con3 = (H >= Ref(L, -5)) OR ( Ref(H, -1) >= Ref(L, -5));
Con4 = (H >= Ref(L, -6)) OR ( Ref(H, -1) >= Ref(L, -6));
Con5 = (H >= Ref(L, -7)) OR ( Ref(H, -1) >= Ref(L, -7));

Buy9Intr = Buy9Req AND (Con1 OR Con2 OR Con3 OR Con4 OR Con5);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// *** Setup Sell Signal ***
//nine consecutive days closes greater than the Close four days earlier.
Con = C > Ref( C, -4);
Sell9Bars = BarsSince(BarsSince(Con));
Sell9Signal = Sell9Bars == 9;

// *** Requirements ***
//The first day of the nine-day must be preceded by a Close day immediately before it that is less than the Close four days earlier
Con = Ref(C, -9) < Ref(C, -13);
Sell9Req = Sell9Signal AND Con;

// *** Intersection ***
//the low of either day 8 or day 9 is less than or equal to the high three,four, five, six, OR seven days earlier
Con1 = (L <= Ref(H, -3)) OR ( Ref(L, -1) <= Ref(H, -3));
Con2 = (L <= Ref(H, -4)) OR ( Ref(L, -1) <= Ref(H, -4));
Con3 = (L <= Ref(H, -5)) OR ( Ref(L, -1) <= Ref(H, -5));
Con4 = (L <= Ref(H, -6)) OR ( Ref(L, -1) <= Ref(H, -6));
Con5 = (L <= Ref(H, -7)) OR ( Ref(L, -1) <= Ref(H, -7));

Sell9Intr = Sell9Req AND (Con1 OR Con2 OR Con3 OR Con4 OR Con5);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(StrToNum(NumToStr(Buy9Intr))) Sell9Intr = False;
if(StrToNum(NumToStr(Sell9Intr))) Buy9Intr = False;
BuySignal = Flip(Buy9Intr, Sell9Intr);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// *** Buy Countdown ***
//With respect to a pending Buy Signal, the close must be less than the low two days earlier
Con = C < Ref(L, -2);
Buy13Count = Sum(Con AND BuySignal, BarsSince(Buy9Intr));
Buy13Signal = Buy13Count == 13;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// *** Sell Countdown ***
//with respect to a pending Sell Signal, the Close must be greater than the High two trading days earlier.
Con = C > Ref(H, -2);
Sell13Count = Sum(Con AND NOT BuySignal, BarsSince(Sell9Intr));
Sell13Signal = Sell13Count == 13;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//*********************************************** TD Sequential Plotting area *************************************************/
Plot(C, "", IIf(O>=C, colorRed, colorGreen), styleBar);
PlotShapes(IIf(Buy9Intr OR Sell9Intr, shapeDigit9, shapeNone),colorBlue, 0, H,
20);
if(ShowNumbers)
PlotShapes(IIf(Buy9Bars==1, shapeDigit1,
IIf(Buy9Bars==2, shapeDigit2,
IIf(Buy9Bars==3, shapeDigit3,
IIf(Buy9Bars==4, shapeDigit4,
IIf(Buy9Bars==5, shapeDigit5,
IIf(Buy9Bars==6, shapeDigit6,
IIf(Buy9Bars==7, shapeDigit7,
IIf(Buy9Bars==8, shapeDigit8,
IIf(Buy9Bars >9, shapeStar,shapeNone))))))))),colorGreen, 0, H, H*.0015);
if(ShowNumbers)
PlotShapes(
IIf(Sell9Bars==1, shapeDigit1,
IIf(Sell9Bars==2, shapeDigit2,
IIf(Sell9Bars==3, shapeDigit3,
IIf(Sell9Bars==4, shapeDigit4,
IIf(Sell9Bars==5, shapeDigit5,
IIf(Sell9Bars==6, shapeDigit6,
IIf(Sell9Bars==7, shapeDigit7,
IIf(Sell9Bars==8, shapeDigit8,
IIf(sell9bars>9, shapeStar,shapeNone))))))))),colorRed, 0, H, H*.0015);

Sell = Sell13Signal AND NOT BuySignal;
Buy = Buy13Signal AND BuySignal;
Sell = ExRem(Sell, Buy);
Buy = ExRem(Buy, Sell);
PlotShapes(Sell*shapeDownArrow, colorYellow, 0, H, -H*.001);
PlotShapes(Buy*shapeUpArrow, colorBrightGreen, 0, L, -L*.001);

if(StrToNum(NumToStr(BuySignal)))
bgColor = ColorRGB(0,66, 2);
else
bgColor = ColorRGB(66,2, 0);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//*********************************************** TD Points Plotting area *************************************************/
if(ShowTDPoints)
{
PlotShapes(TD_Supply()*shapeSmallCircle, colorRed, 0, H, H*.001);
PlotShapes(TD_Demand()*shapeSmallCircle, colorGreen, 0, L, -L*.001);
///////////////////////////////////////////////////////////////////////////
y0 = StrToNum(NumToStr(ValueWhen(TD_Demand(), L)));
x = LineArray(0, y0, (BarCount-1), y0);
Plot(x, "", colorGold, styleDashed);
y0 = StrToNum(NumToStr(ValueWhen(TD_Supply(), H)));
x = LineArray(0, y0, (BarCount-1), y0);
Plot(x, "", colorGold, styleDashed);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//*********************************************** TDST Plotting area *************************************************/
// ---------------->>>> Code from Dave <<<---------------------- //
if(ShowTDST)
{
tdstba =Cum(0);
tdstb = Null;
HHV9 = HHV(H,9);
for (i = 0; i < 10; i++) tdstba = Null;

for( i = 10; i < BarCount; i++ )
{
if (Buy9Bars == 9)
{
HHV_b = HHV9;
if (HHV_b > C[i-9])
tdstb = HHV_b;
else tdstb = C[i-9];

for (j = 0; j < 9; j++ )
tdstba[i-j] = tdstb;
}
else tdstba = tdstb;
}

tdstsa =Cum(0);
tdsts = Null;
LLV9 = LLV(L,9);
for (i = 0; i < 10; i++) tdstsa = Null;

for( i = 10; i < BarCount; i++ )
{
if (Sell9Bars == 9)
{
LLV_b = LLV9;
if (LLV_b < C[i-9])
tdsts = LLV_b;
else tdsts = C[i-9];

for (j = 0; j < 9; j++ )
tdstsa[i-j] = tdsts;
}
else tdstsa = tdsts;
}
Plot(tdstba, "TDSTb", colorBlue,styleStaircase | styleThick|styleDots);
Plot(tdstsa, "TDSTs", colorRed,styleStaircase | styleThick|styleDots);

}
_SECTION_END();

_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

Smart_trade
 

Similar threads