Stocks To Keep A Close Eye On

Status
Not open for further replies.

SavantGarde

Well-Known Member
Guys,

Give me a few days, there are few things besides an excel sheet for Trade Management......

Many of the probables would become clear for instance if Long entry is initiated what do we do if we get a short entry after a couple of Bars...!!!

Most these questions are anticipated and there are some outlines to follow....!!!

One thing is definite trading can't get any simpler than this....:)


SG
 

asnavale

Well-Known Member
Hi Anantji......

Thanks for pointing this out..... The way I have coded it, it's completely possible.... I am a novice at coding :).... You may look at the code in this post..... To eliminate this issue what I would suggest is that: If ever such a situation arises that a bar can qualify both as SB and DB, then the side having bigger wick wins..... ie; if Top Wick is bigger than Bottom Wick, then that bar would be marked as SB and vice-versa..... What are your views Sushilji?

And yes..... please share your code too......

Hi Aditya,

I have already seen you code.

Here is the Code of my AFL:

Code:
_SECTION_BEGIN("DBSB");

SetChartOptions(0, chartShowDates | chartWrapTitle);

TW = H - Max(O, C);
BW = Min(O, C) - L;

//		'Qualifiers' for 'Supply Bar' for Short Entry

//		Immediate Candle on the Left & Right of the Supply Bar 
//		Should Have Smaller Top Wick Than the Supply Bar and 
//		Both Candles on Either Side should have made Lower High

SB = (Ref(TW, -1) < TW) AND (TW > Ref(TW, 1)) AND ((Ref(H, -1) < H) AND (H > Ref(H, 1)));

//		'Qualifiers' for 'Demand Bar' for Long Entry

//		Immediate Candle on the Left & Right of the Demand Bar 
//		Should Have Smaller Lower Wick Than the Demand Bar and
//		Both Candles on Either Side should have made Higher Low

DB = (Ref(BW, -1) < BW) AND (BW > Ref(BW, 1)) AND ((Ref(L, -1) > L) AND (L < Ref(L, 1)));

//
//
//		Now Eliminate the Wickless Left/Right Candles from qualifying
//
//

for(i = 1; i <BarCount - 1; i++)
	{
		if(TW[i - 1] == 0 OR TW[i + 1] == 0) SB[i] = 0;
 		if(BW[i - 1] == 0 OR BW[i + 1] == 0) DB[i] = 0;
	}

Dot = shapeSmallCircle;
DotColor = IIf(SB, colorOrange, colorLightBlue);
DotPosition = IIf(SB, H, L);

_N(Title = StrFormat("{{NAME}} ({{INTERVAL}} {{DATE}}: {{OHLCX}}, Vol=%1.0f\n", V));

Plot(C, "", IIf(O > C, colorGreen, IIf(O < C, colorRed, colorGrey50)), styleCandle);
PlotShapes(IIf(SB OR DB, Dot, shapeNone), DotColor,0, DotPosition, IIf(SB, 10, -10));

_SECTION_END();
-Anant
 

asnavale

Well-Known Member
Anantji..... In your code have a look at the 5th Line from Bottom.....

DotPosition = IIf(SB, H, L);

So, if a candle qualifies both as SB and DB..... The Code would always mark it as SB...... Which is not correct in my opinion... :)
Yes, You are right Aditya. I will correct it after SG starts new thread and gives more inputs.

Thanks

-Anant
 
Last edited:
Status
Not open for further replies.

Similar threads