NQoos ;-)   

TRADING NAKED

Master  your  setup. Master  your Self

 

the interpretation and application of price action concepts

 Thank you for your donation...NQoos 8-)

We all share a similar path in Trading. Even though you may not be a consistently profitable trader now, you can chose to enjoy the path. This alone may make the difference in your success.

 

 

OATPOINTS TRADESTATION


[ Oatpoints ]    [ Tradestation code   Thanks... Vanier Kethi-Reddy ]


 



{ OTTAPOINTS 
Indicator draws horizontal line and write price on the chart where 
entry should be placed
according to the Oattarder overlap method. In honor of the trader 
who is sharing the 
trading concept, I call this indicator oatpoints indicator

Settings:
I have black background and green/red candle stick bar colors
draws green horizontal lines for buy price
draws red horizontal lines for sell price
when isWriteTxt is set to true 
writes green text for buy price
writes red text for sell price

I turn update every tick option off ... it does not make any sense 
to plot
tick by tick, but makes sense to plot at the end bar completion. 

}
Input: blnColor(Green), blnSize(0), blnStyle(Tool_Solid),
slnColor(Red), slnSize(0), slnStyle(Tool_Solid),
isWriteTxt(true),
btxtHA(1), stxtHA(1), { HA = Horizontal Alignment }
btxtVA(4), stxtVA(4), { VA = Vertical Alignment }
btxtColor(Green), stxtColor(Red),
isPlotPivotBars(true),
isPlotEntryBars(true);


{Minimum bars that are required before the study can do any thing }
var: MIN_NUM_BARS(3);
{ Constants to detect the formation }
var: left(2), middle(1), right(0);
{variable to track where the right most bar exist for up pivot point 
detection}
var: upPvtSkip(0);
{up pivot point detected flag }
var: isUpPvtFound(false);
{ Buy Pivot Point }
Var: bpvt(0); 
{Buy state }
Var: bst(0); { 0 = pivot looking, 1 = break out}
{ to remeber the buy pivot bar }
Var: bbar(0); 
{ temp variable for drawing horizontal line for buy price }
Var: bln(0); 
{ temp variable for writing buy price on screen } 
Var: btxt(0); 
{ Buy Entry Price }
Var: betry(0);

{variable to track where the right most bar exist for down pivot point 
detection}
var: dnPvtSkip(0);
{down pivot point detected flag }
var: isDnPvtFound(false);
{ Sell Pivot Point }
Var: spvt(0); 
{Sell State }
Var: sst(0); { 0 = pivot looking, 1 = break out }
{ to remeber the sell pivot bar } 
Var: sbar(0); 
{ temp variable for drawing horizontal line for sell price } 
Var: sln(0); 
{ temp variable for writing sell price on screen } 
Var: stxt(0); 
{ Sell Entry Price }
Var: setry(0);
{ temp variable for bar number calculation } 
Var: barNo(0); 

{ Check if we are waiting for buy entry }
if (betry <> 0)then
begin
{ we assume if low of the bar touches our entry 
point or it less then our entry point we got entry }
if (l <= betry ) then
begin
if (isPlotEntryBars = true) then plot3(l);
{ Initialize the entry price }
betry = 0;
end;
end;

{ Check if we are waiting for sell entry }
if (setry <> 0) then
begin
{ we assume if low of the bar touches our entry 
point or it less then our entry point we got entry }
if (h >= setry ) then
begin
if (isPlotEntryBars = true) then plot4(h);
{ Initialize the entry price }
setry = 0;
end;
end;

{ Check if we are waiting for up side breakout }
if (bst = 1) then
begin
{
Check if we got the price that is higher than the pivot bar high 
and
the bar closes above the pivot 
}
if ( H > bpvt ) and ( c > bpvt) then 
begin
{ draw the line at the buy price}
{ determine where the line should start, it will end on the break 
out bar }
barNo = Currentbar - bbar + 1;
{ draw the line from pivot point to the break out bar }
bln = TL_New( Date[barNo],Time[barNo],bpvt,Date,Time,bpvt);
{ set the line color as specified by the user }
TL_SetColor(bln,blnColor);
{ set the line size. size 0 allows to specifiy different sytles }
TL_SetSize(bln,blnSize);
{ set the line style }
TL_SetStyle(bln,blnStyle);
{ if price plot is requested then write the txt on the screen }
if (isWriteTxt = true ) then 
begin
btxt = Text_New(Date,Time,bpvt,"OB : "+NumToStr(bpvt,2));
{ set the text style }
Text_SetStyle(btxt,btxtHA,btxtVA);
{ set the text color }
Text_SetColor(btxt,btxtColor);
end;
{ remember the buy entry price }
betry = bpvt;
{ forget the sell entry price }
setry = 0;
{ Indicate that we are no longer looking for break out }
bst = 0;
end;
end;

{ Check if we are waiting for down side breakout }
if (sst = 1) then
begin
{
Check if we got the price that is lower than the pivot bar low 
and
the bar closes below the pivot 
}
if ( L < spvt ) and (c < spvt) then 
begin
{ draw the line at the sell price}
{ determine where the line should start, it will end on the break 
out bar }
barNo = Currentbar - sbar + 1;
{ draw the line from pivot point to the break out bar }
sln = TL_New( Date[barNo],Time[barNo],spvt,Date,Time,spvt);
{ set the line color as specified by the user }
TL_SetColor(sln,slnColor);
{ set the line size. size 0 allows to specifiy different sytles }
TL_SetSize(sln,slnSize);
{ set the line style }
TL_SetStyle(sln,slnStyle);
{ if price plot is requested then write the txt on the screen }
if (isWriteTxt = true ) then 
begin
stxt = Text_New(Date,Time,spvt,"OS : "+NumToStr(spvt,2));
{ set the text style }
Text_SetStyle(stxt,stxtHA,stxtVA);
{ set the text color }
Text_SetColor(stxt,stxtColor);
end;
{ remember sell entry price }
setry = spvt;
{ forget the buy entry price }
betry = 0;
{ Indicate that we are no longer for break out }
sst = 0;
end;
end;

{ Check if we have minimum of three bars }
if (currentbar > MIN_NUM_BARS) then 
begin
{ look for up pivot point }
{ check if middle bar high is higher than the left and right bars high 

if ((h[middle] > h[left + upPvtSkip]) and (h[middle] > h[right])) then
begin
{ mark that we have a pivot }
isUpPvtFound = true;
end
else 
{ we did not find the formation so check if middle bar high is higher
than the left bar high }
if (h[middle] > h[left + upPvtSkip]) then
begin
{ check if middle bar high is equal to right bar high }
if (h[middle] = h[right]) then
begin
{ we remeber to skip one bar so that we keep track of left bar }
upPvtSkip = upPvtSkip + middle;
end
else 
{ right bar high is higher than the middle bar, so we have no 
formation
and back to square one.
right bar high can not be lower the the middle bar high at this 
point
simply not possible or else program should crash and burn }
upPvtSkip = right;
end;
{ look for down pivot point }
{ check if middle bar low is lower than the left and right bars low } 
if ((l[middle] < l[left + dnPvtSkip]) and (l[middle] < l[right])) then
begin
{ mark that we have a pivot }
isDnPvtFound = true;
end
else 
{ we did not find the formation so check if middle bar low is lower
than the left bar low }
if (l[middle] < l[left + dnPvtSkip]) then
begin
{ check if middle bar low is equal to right bar low }
if (l[middle] = l[right]) then
begin
{ we remeber to skip one bar so that we keep track of left bar }
dnPvtSkip = dnPvtSkip + middle;
end
else
{ right bar low is lower than the middle bar, so we have no 
formation
and back to square one.
right bar low can not be higher the the middle bar low at this 
point
simply not possible or else program should crash and burn }
dnPvtSkip = right;
end;
end;


{ detect amd remember high pivot point}
If (isUpPvtFound = true) then 
begin
{ plot the pivot point }
if (isPlotPivotBars = true ) then Plot1[middle](H[middle]);
isUpPvtFound = false;
upPvtSkip = right;
{ remember the high pivot point }
bpvt = H[1];
{ remember the high pivot point bar }
bbar = currentbar;
{ Indicate that you are now waiting for breakout bar }
bst = 1;
end;

{ detect and remember low pivot point }
If (isDnPvtFound = true) then 
begin
if (isPlotPivotBars = true) then plot2[middle](L[middle]);
isDnPvtFound = false;
dnPvtSkip = right;
{ remember the low pivot point }
spvt = L[middle];
{ remember the low pivot point bar }
sbar = currentbar;
{ Indicate that you are now waiting for breakout bar }
sst = 1;
end;




 

 

expect miracles, they are everywhere.............. God is good all the time

Algeria Andorra Angola Anguilla Argentina Armenia Aruba Austria Australia Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Bermuda Bolivia Bosnia.and.Herzegovina Botswana Brazil Brunei.Darussalam Bulgaria Burkina.Faso Cambodia Canada Cayman.Islands Chile China Colombia Costa.Rica Cocos.(Keeling).Islands Cote.D'Ivoire.(Ivory.Coast) Czech.Republic Croatia.(Hrvatska) Cyprus Democratic.Republic.of.the.Congo Denmark Dominican.Republic Ecuador El.Salvador Estonia Egypt Equatorial.Guinea Faroe.Islanda Fiji Finland France French.Polynesia Gabon Gambia Germany Ghana Gibralta Greece Grenada Guadeloupe Guatelma Guyana Honduras Hong.Kong Hungary Iceland India Indonesia Iran Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya  Kuwait Kyrgyzstan Latvia Lebanon Libya Liechtenstein Lithuania Luxembourg Macau Republic.of.Macadonia Malaysia Maldives Malta Martinique Mauritius Mauritania Mexico Moldova  Monaco Mongolia Morocco Mozambique Myanmar Namibia Netherlands Netherlands.Antilles New.Caledonia New.Zealand.(Aotearoa)  Nicaragua Nigeria Niue Norway Oman Pakistan Palestinian.Territory Panama Papua.New.Guinea Paraguay Peru Philippines Poland Portugal Puerto.Rico Qatar Reunion Romania Russian.Federation Rwanda Saint.Kitts.and.Nevis Saint.Lucia Saint.Vincent.and.the.Grenadines San.Marino San.Salvador Santo.Domingo Saudi.Arabia Senegal Serbia Seychelles Singapore Slovak.Republic Slovenia South.Africa South.Korea Spain Sri.Lanka Sweden Sudan Switzerland Syria Taiwan Tajikistan Tanzania Thailand Trinidad.and.Tobago Togo Tunisia Turkey Turks.and.Caicos.Islands Tuvalu Uganda Ukraine Uruguay United.Arab.Emirates United.Kingdom United.States Uruguay Uzbekistan Vanuatu Venezuela Vietnam Virgin.Islands Yemen Yugoslavia Zambia Zimbabwe

contact TradingNaked                                  yes I am from the '60's           surfed from 168 countries             yes I am from the '60's                                               claimer              

All content copyright (c) 2002-2008 TradingNaked.com and their providers.  All rights reserved.