Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
}
}
Holiday = TimeFrameCompress(Holiday,inDaily);
//apply holiday filter if the user selects it in the parameters
if(FltrHolidays == 0)
{
//code and plot the NR4
DlyNR4 = IIf(Holiday OR (BarsSince(Holiday) >= 1 AND BarsSince(Holiday) <= 4),
(LLV(DlyRng,5) == (DlyRng)),
(LLV(DlyRng,4) == (DlyRng)));
//code and plot the WS4
DlyWS4 = IIf(Holiday OR (BarsSince(Holiday) >= 1 AND BarsSince(Holiday) <= 4),
(HHV(DlyRng,5) == (DlyRng)),
HHV(DlyRng,4) == (DlyRng));
//code and plot the NR7
DlyNR7 = IIf(Holiday OR (BarsSince(Holiday) >= 1 AND BarsSince(Holiday) <= 7),
(LLV(DlyRng,8) == (DlyRng)),
(LLV(DlyRng,7) == (DlyRng)));
//code and plot the WS7
DlyWS7 = IIf(Holiday OR (BarsSince(Holiday) >= 1 AND BarsSince(Holiday) <= 7),
(HHV(DlyRng,8) == (DlyRng)),
(HHV(DlyRng,7) == (DlyRng)));
//calculate the 2 day range
DlyTwoDayRng = IIf(Holiday OR (BarsSince(Holiday) == 1 ),
HHV(DlyH ,3) - LLV(DlyL ,3),
HHV(DlyH ,2) - LLV(DlyL ,2));
//calculate the 3 day range
DlyThreeDayRng = IIf(Holiday OR (BarsSince(Holiday) >= 1 AND BarsSince(Holiday)
<= 2),
HHV(DlyH ,4) - LLV(DlyL ,4),
HHV(DlyH ,3) - LLV(DlyL ,3));
TitleDoji = WriteIf(Holiday OR (BarsSince(Holiday) >= 1 AND BarsSince(Holiday) <
= 2),
EncodeColor(colorGold) +WriteIf(
Ref(doji,-2), " Doji Day" +"\n", ""),
EncodeColor(colorGold) +WriteIf(
Ref(doji,-1), " Doji Day" +"\n", ""));
}
//calculate the price patterns based on standard method if the user
//has selected NO in the filter holidays parameter.
if(FltrHolidays == 1)
{
//code and plot the NR4
DlyNR4 = (LLV(DlyRng,4) == (DlyRng));
//code and plot the WS4
DlyWS4 = (HHV(DlyRng,4) == (DlyRng));
//code and plot the NR7
DlyNR7 = (LLV(DlyRng,7) == (DlyRng));
//code and plot the WS7
DlyWS7 = (HHV(DlyRng,7) == (DlyRng));
//calculate the 2 day range
DlyTwoDayRng = HHV(DlyH ,2) - LLV(DlyL ,2);
//calculate the 3 day range
DlyThreeDayRng = HHV(DlyH ,3) - LLV(DlyL ,3);
1 is ORB which is a simple scan showing the brekout, profit and stop
for each ticker. Run this scan within first minutes of market open to
the levels for each of the securities you are tracking. Set the range
analsys window to 'n last days' where n=1.
The two lines below display the output of the STATS exploration $$$$$$$
The top line contains the column headings and the bottom line
$$$$$$$
contains the data for each time stamp. Trend is measured as a 1 $$$$$$$
day swing pivot. U means the previous day closed above a recent $$$$$$$
pivot top. D mena the previous day closed below a recent
$$$$$$$
$$$$$$$
both the recent pivot top and pivot bottom. D3 and D2 are plus $$$$$$$
and minus symbols to show the close of each day relative to the $$$$$$$
previous. D1 is the current day's open relative to previous
$$$$$$$
$$$$$$$
$$$$$$$
price patterns taken from Toby Crabel's book. 1's and 0's show $$$$$$$
for each time stamp what the PREVIOUS day's price pattern
$$$$$$$
looked like. After the price patterns you find the 6 dollar
$$$$$$$
values for the breakout, stop and profit targets. The final 6
$$$$$$$
columns show what occured during each step and using 1's and
$$$$$$$
$$$$$$$
$$$$$$$
$$$
Ticker
D2
D1
LngTarg LngStp
ShrtEnt StpOut
ESU9-GLOBEX-FUT
1
1
871.5 867.25
0
Date/Time
WS4
WS7 Doji
NR4
BOS
ShrtTarg
Targ
5/1/2009 9:37
U
0
0
0
853.25
868.5
1
0
Trend D3
NR7
BOL
ShrtStp LngEnt StpOut Targ
+
873
0
+
886.75
0
0
{
Filter = TimeNum() == TimeOpen;
AddColumn(breakOutLong, "BOL", 1.2);
AddColumn(ProfitLong, "LngTarg", 1.2);
AddColumn(breakOutLong - StopAmtLong, "LngStp", 1.2);
AddColumn(breakOutShort, "BOS", 1.2);
AddColumn(ProfitShort, "ShrtTarg", 1.2);
AddColumn(breakOutShort + StopAmtShort, "ShrtStp", 1.2);
}
if(expFilter == "STATS")
{
Filter = MrktHours AND
( FirstBOS OR FirstShortStop OR FirstProfitShort OR Fir
stBOL OR FirstLongStop OR FirstProfitLong );
AddColumn(IIf( ExpSwingTrend == 9, 85,
IIf( ExpSwingTrend == 0, 68, 70 )), "Trend", formatChar
);
AddColumn(IIf(PrevC2 > PrevC3, 43, 45), "D3", formatChar);
AddColumn(IIf(PrevC > PrevC2, 43, 45), "D2", formatChar);
AddColumn(IIf(MrktOpen > PrevC, 43, 45), "D1", formatChar);
AddColumn(WS4, "WS4", 1);
AddColumn(WS7, "WS7", 1);
AddColumn(doji, "Doji", 1);
AddColumn(NR4, "NR4", 1);
AddColumn(NR7, "NR7", 1);
AddColumn(breakOutLong, "BOL", 1.2);
AddColumn(ProfitLong, "LngTarg", 1.2);
AddColumn(breakOutLong - StopAmtLong, "LngStp", 1.2);
AddColumn(breakOutShort, "BOS", 1.2);
AddColumn(ProfitShort, "ShrtTarg", 1.2);
AddColumn(breakOutShort + StopAmtShort, "ShrtStp", 1.2);
AddColumn(FirstBOL, "LngEnt", 1);
AddColumn(FirstLongStop, "StpOut", 1);
AddColumn(FirstProfitLong, "Targ", 1);
AddColumn(FirstBOS, "ShrtEnt", 1);
AddColumn(FirstShortStop, "StpOut", 1);
AddColumn(FirstProfitShort, "Targ", 1);
}
if(expFilter == "OHLC")
{
//When exploration filter is set to OHLC in parameters,
//this will output the O,H,L,C for each day/ticker selected in
//the analysis window.
Filter = CurBarTime == TimeClose ;
AddColumn(DlyOpen, "O", 1.2);
AddColumn(DlyHighest, "H", 1.2);
AddColumn(DlyLowest, "L", 1.2);
AddColumn(DlyClose, "C", 1.2);
}
_SECTION_END();
_SECTION_BEGIN("Daily Pivots");
//Determine the value of the market close. Initial setting is for