Thx Howard but I've got that already. The problem is that the H, L and C are
coming from a 12midnight to 12 midnight day and I'd like a 7:15pm to 5 pm day
as per the trading day of the YM future. You see my problem?
----- Original Message -----
From: Howard B
To: [email protected]
Sent: Tuesday, June 26, 2007 12:46 PM
Subject: Re: [amibroker] Pivots for Futures
Here is one method of calculating Pivot Points.
//----------------------------------------------------
// PivotPoints.afl
//
// Traditional pivot points.
// Thought by some to indicate levels of support
// and resistance.
//R2 = P + (H - L) = P + (R1 - S1)
//R1 = (P x 2) - L
//P = (H + L + C) / 3
//S1 = (P x 2) - H
//S2 = P - (H - L) = P - (R1 - S1)
P = (H + L + C) / 3;
R1 = (P * 2) - L;
S1 = (P * 2) - H;
R2 = P + (R1 - S1); // P + (H - L)
S2 = P - (R1 - S1); // P - (H - L)
Plot(C,"C",colorBlack,styleCandle);
// Displace the plot of the pivot points one bar
// to the right.
// Pivot points are based on the current bar,
// but are thought to provide indication of
// support and resistance for the next bar.
//
Displace=1;
Plot(R2,"R2",colorRed,styleLine,0,0,Displace);
Plot(R1,"R1",colorPink,styleLine,0,0,Displace);
Plot(P,"P",colorBlue,styleLine,0,0,Displace);
Plot(S1,"S1",colorPaleGreen,styleLine,0,0,Displace);
Plot(S2,"S2",colorGreen,styleLine,0,0,Displace);
//Figure 8.5 Pivot Points
//------------------------------------------
Thanks,
Howard
www.quantitativetradingsystems.com
On 6/25/07, jjj_98 <[EMAIL PROTECTED]> wrote:
Does anyone know if there is any code for pivots for futures? What I
mean is for futures, say the Dow mini for example, the pivots are
generally calculated based on 6:15pm Open and 5 pm Close (the following
day). I assume that there is code for this already but have not been
able to find it. Hopefully there is otherwise a few days of programming
in the works for me.
thx,
Fred
#ygrp-mlmsg { FONT-SIZE: small; FONT-FAMILY:
arial,helvetica,clean,sans-serif}#ygrp-mlmsg TABLE { }#ygrp-mlmsg SELECT {
FONT: 99% arial,helvetica,clean,sans-serif}INPUT { FONT: 99%
arial,helvetica,clean,sans-serif}TEXTAREA { FONT: 99%
arial,helvetica,clean,sans-serif}#ygrp-mlmsg PRE { FONT: 100% monospace}CODE
{ FONT: 100% monospace}#ygrp-mlmsg * { LINE-HEIGHT: 1.22em}#ygrp-text {
FONT-FAMILY: Georgia}#ygrp-text P { MARGIN: 0px 0px 1em}#ygrp-tpmsgs
{ CLEAR: both; FONT-FAMILY: Arial}#ygrp-vitnav { FONT-SIZE: 77%; MARGIN:
0px; PADDING-TOP: 10px; FONT-FAMILY: Verdana}#ygrp-vitnav A { PADDING-RIGHT:
1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}#ygrp-actbar {
CLEAR: both; MARGIN: 25px 0px; COLOR: #666; WHITE-SPACE: nowrap; TEXT-ALIGN:
right}#ygrp-actbar .left { FLOAT: left; WHITE-SPACE: nowrap}..bld {
FONT-WEIGHT: bold}#ygrp-grft { PADDING-RIGHT: 0px; PADDING-LEFT: 0px;
FONT-SIZE: 77%; PADDING-BOTTOM: 15px; PADDING-TOP: 15px; FONT-FAMILY:
Verdana}#ygrp-ft { PADDING-RIGHT: 0px; BORDER-TOP: #666 1px solid;
PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 5px; PADDING-TOP: 5px;
FONT-FAMILY: verdana}#ygrp-mlmsg #logo { PADDING-BOTTOM: 10px}#ygrp-vital
{ PADDING-RIGHT: 0px; PADDING-LEFT: 8px; MARGIN-BOTTOM: 20px;
PADDING-BOTTOM: 8px; PADDING-TOP: 2px; BACKGROUND-COLOR: #e0ecee}#ygrp-vital
#vithd { FONT-WEIGHT: bold; FONT-SIZE: 77%; TEXT-TRANSFORM: uppercase;
COLOR: #333; FONT-FAMILY: Verdana}#ygrp-vital UL { PADDING-RIGHT: 0px;
PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 2px 0px; PADDING-TOP:
0px}#ygrp-vital UL LI { CLEAR: both; BORDER-RIGHT: #e0ecee 1px solid;
BORDER-TOP: #e0ecee 1px solid; BORDER-LEFT: #e0ecee 1px solid; BORDER-BOTTOM:
#e0ecee 1px solid; LIST-STYLE-TYPE: none}#ygrp-vital UL LI .ct {
PADDING-RIGHT: 0.5em; FONT-WEIGHT: bold; FLOAT: right; WIDTH: 2em; COLOR:
#ff7900; TEXT-ALIGN: right}#ygrp-vital UL LI .cat { FONT-WEIGHT:
bold}#ygrp-vital A { TEXT-DECORATION: none}#ygrp-vital A:hover {
TEXT-DECORATION: underline}#ygrp-sponsor #hd { FONT-SIZE: 77%; COLOR:
#999}#ygrp-sponsor #ov { PADDING-RIGHT: 13px; PADDING-LEFT: 13px;
MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; BACKGROUND-COLOR:
#e0ecee}#ygrp-sponsor #ov UL { PADDING-RIGHT: 0px; PADDING-LEFT: 8px;
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px}#ygrp-sponsor #ov LI {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 6px;
PADDING-TOP: 6px; LIST-STYLE-TYPE: square}#ygrp-sponsor #ov LI A { FONT-SIZE:
130%; TEXT-DECORATION: none}#ygrp-sponsor #nc { PADDING-RIGHT: 8px;
PADDING-LEFT: 8px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;
BACKGROUND-COLOR: #eee}#ygrp-sponsor .ad { PADDING-RIGHT: 0px; PADDING-LEFT:
0px; PADDING-BOTTOM: 8px; PADDING-TOP: 8px}#ygrp-sponsor .ad #hd1 {
FONT-WEIGHT: bold; FONT-SIZE: 100%; COLOR: #628c2a; LINE-HEIGHT: 122%;
FONT-FAMILY: Arial}#ygrp-sponsor .ad A { TEXT-DECORATION: none}#ygrp-sponsor
.ad A:hover { TEXT-DECORATION:
underline}#ygrp-sponsor .ad P { MARGIN: 0px}o { FONT-SIZE:
0px}..MsoNormal { MARGIN: 0px}#ygrp-text TT { FONT-SIZE: 120%}BLOCKQUOTE
{ MARGIN: 0px 0px 0px 4px}..replbq { }
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.