Pivot Lines
Updated October 30, 2017
trending_up
712 views
thumb_up
0 thanks given
group
2 followers
forum
1 posts
attach_file
1 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
(login for full post details)
#1 (permalink )
São Borja/RS/Brasil
Posts: 1 since Oct 2017
Thanks: 0 given,
0
received
Dear, could anyone help?
I am a beginner and I can not hit the formula, the PPivot bars do not follow when prices move to the right. They stay static without moving.
Code:
Inputs:
StartCalcTime (0000),
EndCalcTime (2359),
PlaceTextRight (true),
PlotatDateChange (true),
PlotToDateEnd (true),
IgnoreWeekends (true),
TLSize (1),
TLStyle (1),
PivColor (yellow),
R1Color (red),
R2Color (red),
R3Color (red),
S1Color (green),
S2Color (green),
S3Color (green);
Variables:
Monday2Friday (false),
RR1 (0),
RR2 (0),
RR3 (0),
SS1 (0),
SS2 (0),
SS3 (0),
PP (0),
RR1TL (0),
RR2TL (0),
RR3TL (0),
SS1TL (0),
SS2TL (0),
SS3TL (0),
PPTL (0),
DayHi (-999999),
DayLo (+999999),
HaveTLs (false),
StartTime (0),
EndTime (0),
R1Txt (0),
R2Txt (0),
R3Txt (0),
S1Txt (0),
S2Txt (0),
S3Txt (0),
PPTxt (0),
SessClose (0),
TextStyleHoriz (1), //0: To the right of the bar specified for the text object
//1: To the left of the bar specified for the text object
//2: Centered on the bar specified for the text object
TextStyleVert (2); //0: Beneath the price specified for the text object
//1: Above the price specified for the text object
//2: Centered on the specified price location of the text object
if BarType <= 1 or BarType >= 5 then
begin
If IgnoreWeekends then begin
If DayOfWeek(Date) >= Monday and DayOfWeek(Date) <= Friday then
Monday2Friday = true
else
Monday2Friday = false;
end
else begin
Monday2Friday = true;
end;
´
If Monday2Friday then begin
If Date <> Date[1] then begin
If PlaceTextRight then
TextStyleVert = 1;
If PlotatDateChange then
StartTime = Time
else
StartTime = StartCalcTime;
EndTime = Time[1];
PP = (DayHi + DayLo + SessClose[1])/3 ;
RR1 = PP * 2 - DayLo;
RR2 = PP + DayHi - DayLo;
RR3 = RR2 + DayHi - DayLo;
SS1 = PP * 2 - DayHi;
SS2 = PP - DayHi + DayLo;
SS3 = SS2 - DayHi + DayLo;
DayHi = -999999;
DayLo = +999999;
HaveTLs = false;
end; //If Date <> Date[1] then begin...
If Time > StartCalcTime and Time <= EndCalcTime then begin
If High >= DayHi then DayHi = High;
If Low <= DayLo then DayLo = Low;
If BarStatus(1) = 2 then
SessClose = Close;
end;//If Time > StartCalcTime and Time <= EndCalcTime then begin...
If HaveTLs = false then begin
HaveTLs = true;
RR1TL = TL_New(Date, StartTime, RR1, Date, EndTime, RR1);
TL_SetColor(RR1TL, R1Color);
TL_SetSize(RR1TL, TLSize);
TL_SetStyle(RR1TL, TLStyle);
RR2TL = TL_New(Date, StartTime, RR2, Date, EndTime, RR2);
TL_SetColor(RR2TL, R2Color);
TL_SetSize(RR2TL, TLSize);
TL_SetStyle(RR2TL, TLStyle);
RR3TL = TL_New(Date, StartTime, RR3, Date, EndTime, RR3);
TL_SetColor(RR3TL, R3Color);
TL_SetSize(RR3TL, TLSize);
TL_SetStyle(RR3TL, TLStyle);
SS1TL = TL_New(Date, StartTime, SS1, Date, EndTime, SS1);
TL_SetColor(SS1TL, S1Color);
TL_SetSize(SS1TL, TLSize);
TL_SetStyle(SS1TL, TLStyle);
SS2TL = TL_New(Date, StartTime, SS2, Date, EndTime, SS2);
TL_SetColor(SS2TL, S2Color);
TL_SetSize(SS2TL, TLSize);
TL_SetStyle(SS2TL, TLStyle);
SS3TL = TL_New(Date, StartTime, SS3, Date, EndTime, SS3);
TL_SetColor(SS3TL, S3Color);
TL_SetSize(SS3TL, TLSize);
TL_SetStyle(SS3TL, TLStyle);
PPTL = TL_New(Date, StartTime, PP, Date, EndTime, PP);
TL_SetColor(PPTL, PivColor);
TL_SetSize(PPTL, TLSize);
TL_SetStyle(PPTL, TLStyle);
R1Txt = Text_New(Date, StartTime, RR1, "R1");
Text_SetStyle(R1Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(R1Txt, R1Color);
R2Txt = Text_New(Date, StartTime, RR2, "R2");
Text_SetStyle(R2Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(R2Txt, R2Color);
R3Txt = Text_New(Date, StartTime, RR3, "R3");
Text_SetStyle(R3Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(R3Txt, R3Color);
S1Txt = Text_New(Date, StartTime, SS1, "S1");
Text_SetStyle(S1Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(S1Txt, S1Color);
S2Txt = Text_New(Date, StartTime, SS2, "S2");
Text_SetStyle(S2Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(S2Txt, S2Color);
S3Txt = Text_New(Date, StartTime, SS3, "S3");
Text_SetStyle(S3Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(S3Txt, S3Color);
PPTxt = Text_New(Date, StartTime, PP, "PP");
Text_SetStyle(PPTxt, TextStyleHoriz, TextStyleVert);
Text_SetColor(PPTxt, PivColor);
end //If HaveTLs = false then begin...
else begin
If PlotToDateEnd then
EndTime = EndTime
else
EndTime = EndCalcTime;
TL_SetEnd(RR1TL, Date, EndTime, RR1);
TL_SetEnd(RR2TL, Date, EndTime, RR2);
TL_SetEnd(RR3TL, Date, EndTime, RR3);
TL_SetEnd(SS1TL, Date, EndTime, SS1);
TL_SetEnd(SS2TL, Date, EndTime, SS2);
TL_SetEnd(SS3TL, Date, EndTime, SS3);
TL_SetEnd(PPTL, Date, EndTime, PP);
If PlaceTextRight then begin
Text_SetLocation(R1Txt, Date, EndTime, RR1);
Text_SetLocation(R2Txt, Date, EndTime, RR2);
Text_SetLocation(R3Txt, Date, EndTime, RR3);
Text_SetLocation(S1Txt, Date, EndTime, SS1);
Text_SetLocation(S2Txt, Date, EndTime, SS2);
Text_SetLocation(S3Txt, Date, EndTime, SS3);
Text_SetLocation(PPTxt, Date, EndTime, PP);
end; //If PlaceTextRight then begin...
end; //If HaveTLs then begin...
end; //If Monday2Friday then begin...
end
else
RaiseRunTimeError( "Somente Intraday." ) ;
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#2 (permalink )
Posts: 2,230 since Apr 2013
Thanks: 409 given,
1,471
received
flerte,
this appears to be the code that I posted once. However some some parts, comments and the header are removed removed. I would suggest to download a full, working version here on futures.io, the MC forum or my website etc..
Regards,
ABCTG
flerte
Dear, could anyone help?
I am a beginner and I can not hit the formula, the PPivot bars do not follow when prices move to the right. They stay static without moving.
Code:
Inputs:
StartCalcTime (0000),
EndCalcTime (2359),
PlaceTextRight (true),
PlotatDateChange (true),
PlotToDateEnd (true),
IgnoreWeekends (true),
TLSize (1),
TLStyle (1),
PivColor (yellow),
R1Color (red),
R2Color (red),
R3Color (red),
S1Color (green),
S2Color (green),
S3Color (green);
Variables:
Monday2Friday (false),
RR1 (0),
RR2 (0),
RR3 (0),
SS1 (0),
SS2 (0),
SS3 (0),
PP (0),
RR1TL (0),
RR2TL (0),
RR3TL (0),
SS1TL (0),
SS2TL (0),
SS3TL (0),
PPTL (0),
DayHi (-999999),
DayLo (+999999),
HaveTLs (false),
StartTime (0),
EndTime (0),
R1Txt (0),
R2Txt (0),
R3Txt (0),
S1Txt (0),
S2Txt (0),
S3Txt (0),
PPTxt (0),
SessClose (0),
TextStyleHoriz (1), //0: To the right of the bar specified for the text object
//1: To the left of the bar specified for the text object
//2: Centered on the bar specified for the text object
TextStyleVert (2); //0: Beneath the price specified for the text object
//1: Above the price specified for the text object
//2: Centered on the specified price location of the text object
if BarType <= 1 or BarType >= 5 then
begin
If IgnoreWeekends then begin
If DayOfWeek(Date) >= Monday and DayOfWeek(Date) <= Friday then
Monday2Friday = true
else
Monday2Friday = false;
end
else begin
Monday2Friday = true;
end;
´
If Monday2Friday then begin
If Date <> Date[1] then begin
If PlaceTextRight then
TextStyleVert = 1;
If PlotatDateChange then
StartTime = Time
else
StartTime = StartCalcTime;
EndTime = Time[1];
PP = (DayHi + DayLo + SessClose[1])/3 ;
RR1 = PP * 2 - DayLo;
RR2 = PP + DayHi - DayLo;
RR3 = RR2 + DayHi - DayLo;
SS1 = PP * 2 - DayHi;
SS2 = PP - DayHi + DayLo;
SS3 = SS2 - DayHi + DayLo;
DayHi = -999999;
DayLo = +999999;
HaveTLs = false;
end; //If Date <> Date[1] then begin...
If Time > StartCalcTime and Time <= EndCalcTime then begin
If High >= DayHi then DayHi = High;
If Low <= DayLo then DayLo = Low;
If BarStatus(1) = 2 then
SessClose = Close;
end;//If Time > StartCalcTime and Time <= EndCalcTime then begin...
If HaveTLs = false then begin
HaveTLs = true;
RR1TL = TL_New(Date, StartTime, RR1, Date, EndTime, RR1);
TL_SetColor(RR1TL, R1Color);
TL_SetSize(RR1TL, TLSize);
TL_SetStyle(RR1TL, TLStyle);
RR2TL = TL_New(Date, StartTime, RR2, Date, EndTime, RR2);
TL_SetColor(RR2TL, R2Color);
TL_SetSize(RR2TL, TLSize);
TL_SetStyle(RR2TL, TLStyle);
RR3TL = TL_New(Date, StartTime, RR3, Date, EndTime, RR3);
TL_SetColor(RR3TL, R3Color);
TL_SetSize(RR3TL, TLSize);
TL_SetStyle(RR3TL, TLStyle);
SS1TL = TL_New(Date, StartTime, SS1, Date, EndTime, SS1);
TL_SetColor(SS1TL, S1Color);
TL_SetSize(SS1TL, TLSize);
TL_SetStyle(SS1TL, TLStyle);
SS2TL = TL_New(Date, StartTime, SS2, Date, EndTime, SS2);
TL_SetColor(SS2TL, S2Color);
TL_SetSize(SS2TL, TLSize);
TL_SetStyle(SS2TL, TLStyle);
SS3TL = TL_New(Date, StartTime, SS3, Date, EndTime, SS3);
TL_SetColor(SS3TL, S3Color);
TL_SetSize(SS3TL, TLSize);
TL_SetStyle(SS3TL, TLStyle);
PPTL = TL_New(Date, StartTime, PP, Date, EndTime, PP);
TL_SetColor(PPTL, PivColor);
TL_SetSize(PPTL, TLSize);
TL_SetStyle(PPTL, TLStyle);
R1Txt = Text_New(Date, StartTime, RR1, "R1");
Text_SetStyle(R1Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(R1Txt, R1Color);
R2Txt = Text_New(Date, StartTime, RR2, "R2");
Text_SetStyle(R2Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(R2Txt, R2Color);
R3Txt = Text_New(Date, StartTime, RR3, "R3");
Text_SetStyle(R3Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(R3Txt, R3Color);
S1Txt = Text_New(Date, StartTime, SS1, "S1");
Text_SetStyle(S1Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(S1Txt, S1Color);
S2Txt = Text_New(Date, StartTime, SS2, "S2");
Text_SetStyle(S2Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(S2Txt, S2Color);
S3Txt = Text_New(Date, StartTime, SS3, "S3");
Text_SetStyle(S3Txt, TextStyleHoriz, TextStyleVert);
Text_SetColor(S3Txt, S3Color);
PPTxt = Text_New(Date, StartTime, PP, "PP");
Text_SetStyle(PPTxt, TextStyleHoriz, TextStyleVert);
Text_SetColor(PPTxt, PivColor);
end //If HaveTLs = false then begin...
else begin
If PlotToDateEnd then
EndTime = EndTime
else
EndTime = EndCalcTime;
TL_SetEnd(RR1TL, Date, EndTime, RR1);
TL_SetEnd(RR2TL, Date, EndTime, RR2);
TL_SetEnd(RR3TL, Date, EndTime, RR3);
TL_SetEnd(SS1TL, Date, EndTime, SS1);
TL_SetEnd(SS2TL, Date, EndTime, SS2);
TL_SetEnd(SS3TL, Date, EndTime, SS3);
TL_SetEnd(PPTL, Date, EndTime, PP);
If PlaceTextRight then begin
Text_SetLocation(R1Txt, Date, EndTime, RR1);
Text_SetLocation(R2Txt, Date, EndTime, RR2);
Text_SetLocation(R3Txt, Date, EndTime, RR3);
Text_SetLocation(S1Txt, Date, EndTime, SS1);
Text_SetLocation(S2Txt, Date, EndTime, SS2);
Text_SetLocation(S3Txt, Date, EndTime, SS3);
Text_SetLocation(PPTxt, Date, EndTime, PP);
end; //If PlaceTextRight then begin...
end; //If HaveTLs then begin...
end; //If Monday2Friday then begin...
end
else
RaiseRunTimeError( "Somente Intraday." ) ;
Last Updated on October 30, 2017
Right now
Ongoing
Right now
February
Coming soon
March
Register to Attend
Elite only