Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 03-14-2010, 03:13 PM   #41

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts

Re: Automatic Pivots Calculation - Help

I don't know Carter's PP and put in input adjustable

maybe this will help

Code:
input: SessStart(1803),SessEND(1615),PivotMethod(1);

variables:
var0( 0 ) , pp( 0 ) ,
var1( 0 ) , R1( 0 ) ,
var2( 0 ) , R2( 0 ) ,
var3( 0 ) , R3( 0 ) ,
var4( 0 ) , S1( 0 ) ,
var5( 0 ) , S2( 0 ) ,
var6( 0 ) , S3( 0 ) ,
var7( 0 ) ,
var8( 0 ) ,
SessReset( False ) ,
PivotReset( False ) ;


SessReset = t = SessEnd;
PivotReset = t = SessStart;

if SessReset then
begin

var0 = var0 + 1 ;
var1 = var2 ;
var3 = var4 ;
var5 = var6 ;
var7 = Close;
end;

if PivotReset then
begin

var2 = Open ;
var4 = High ;
var6 = Low ;
end

else
begin
if High > var4 then
var4 = High ;
if Low < var6 then
var6 = Low ;
end ;
condition1 = var0 >= 2 and BarType < 3 ;

if PivotMethod = 1 then PP = ( var3 + var5 + var7 ) / 3; 

if PivotMethod = 2 then PP = ( var3 + var5 + var7 + var2 ) / 4;

if PivotMethod = 3 then PP = ( var3 + var5 + var2 ) / 3; 

R1 = PP * 2 - var5;
R2 = PP + var3 - var5; 
R3 = R2 + var3 - var5; 
S1 = PP * 2 - var3; 
S2 = PP - var3 + var5; 
S3 = S2 - var3 + var5; 


if condition1 then begin

Plot1(R1, "R1" ) ;
Plot2( R2, "R2" ) ;
Plot3( R3, "R3" ) ;
Plot4( S1, "S1" ) ;
Plot5( S2, "S2" ) ;
Plot6( S3, "S3" ) ;

end ;
statsign is offline  
Reply With Quote

Reply

Tags
pivot, price volume relationship

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gold,Dollar and Euro Calculation mehtaka Beginners Forum 7 06-17-2010 09:08 AM
Tick Size Calculation PeterBrazel Coding Forum 1 08-17-2009 08:55 PM
Trendlines Automatic dhelmin Coding Forum 1 06-29-2009 09:10 PM
Trend Lines Automatic khagans Coding Forum 1 02-25-2009 12:01 AM
Capital Progression Calculation in Perl Sparrow Coding Forum 4 03-07-2008 09:33 AM

All times are GMT -4. The time now is 02:29 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.