Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Pivot points - Multicharts
Updated July 15, 2014
Top Posters
looks_one
ABCTG
with 4 posts (3 thanks)
looks_two
georgex
with 3 posts (1 thanks)
looks_3
hoolio
with 2 posts (1 thanks)
looks_4
Quick Summary
with 1 posts (0 thanks)
trending_up
4,347 views
thumb_up
5 thanks given
group
3 followers
forum
9 posts
attach_file
1 attachments
Pivot points - Multicharts
May 12th, 2014, 01:08 PM
Prag/czechrepublic
Experience: Intermediate
Platform: Multicharts, NinjaTrader
Broker: IB
Trading: Currency
Posts: 3 since Jan 2014
Thanks Given: 0
Thanks Received: 1
Helo,
i have one script Pivot points
For day is formula:
......
if date <> date[1] then begin
....
for month is
...
if month(date) <> month(date)[1] then begin
...
but for week do not work. you have any idea how to do it:
Complete script:
--------------------------------------------------------------------
inputs:
StartCalcTime (0000),
EndCalcTime (2359),
PlaceTextRight (true),
PlotDateChange (true),
PlotToDateEnd (true),
IgnoreWeekends (true),
PivColor (yellow),
R1Color (Red),
R2Color (Red),
R3Color (Red),
S1Color (green),
S2Color (green),
S3Color (green),
TLSize (2),
TLStyle (2);
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,1,2
TextStyleVert (2);//0,1,2
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 week(date)<> week(date)[1] then begin
if PlaceTextRight then
TextStyleVert = 1;
if PlotDateChange then
starttime = Time
else
starttime = StartCalcTime;
endtime = time[1];
PP = (DayHi+DayLo+SessClose[1])/3;
RR1 = PP*2 - DayLo;
RR2 = PP + (DayHi - DayLo);
RR3 = DayHi + 2*(PP-DayLo);
SS1 = (PP*2) - DayHi;
SS2 = PP - (DayHi - daylo);
SS3 = dayLo - 2*(DayHi-PP);
dayhi = -999999;
Daylo = +999999;
HaveTLs = false;
end;
if time > StartCalcTime and time <= EndCalcTime then begin
if High >= dayhi then dayhi = High;
if Low <=daylo then daylo=Low;
SessClose=close;
end;
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 W");
Text_setstyle(R1Txt,Textstylehoriz, textstylevert);
text_setcolor(R1Txt, R1Color);
R2Txt = text_new(Date, Starttime, RR2,"R2 W");
Text_setstyle(R2Txt,Textstylehoriz, textstylevert);
text_setcolor(R2Txt, R2Color);
R3Txt = text_new(Date, Starttime, RR3,"R3 W");
Text_setstyle(R3Txt,Textstylehoriz, textstylevert);
text_setcolor(R3Txt, R3Color);
S1Txt = text_new(Date, Starttime, SS1,"S1 W");
Text_setstyle(S1Txt,Textstylehoriz, textstylevert);
text_setcolor(S1Txt, S1Color);
S2Txt = text_new(Date, Starttime, SS2,"S2 W");
Text_setstyle(S2Txt,Textstylehoriz, textstylevert);
text_setcolor(S2Txt, S2Color);
S3Txt = text_new(Date, Starttime, SS3,"S3 W");
Text_setstyle(S3Txt,Textstylehoriz, textstylevert);
text_setcolor(S3Txt, S3Color);
PPTxt = text_new(Date, Starttime, PP,"PP W");
Text_setstyle(PPTxt,Textstylehoriz, textstylevert);
text_setcolor(PPTxt, PivColor);
end
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;
end;
end;
if 0=1 then
begin
plot1(PP,"PP",PivColor,TLSize);
end
else begin
Noplot(1);
end;
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
May 12th, 2014, 01:22 PM
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627
georgex,
you can use DayOfWeek(Date) to return the day of the week starting with 0 for Sunday, 1 for Monday etc..
So something like to detect a new week:
Code
Variables:
DayOfTheWeek(0);
DayOfTheWeek = DayOfWeek(Date);
if DayOfTheWeek < DayOfTheWeek[1] then
Plot1(+1)
else
Plot1(0);
Regards,
ABCTG
May 12th, 2014, 01:39 PM
Prag/czechrepublic
Experience: Intermediate
Platform: Multicharts, NinjaTrader
Broker: IB
Trading: Currency
Posts: 3 since Jan 2014
Thanks Given: 0
Thanks Received: 1
ABCTG,
Thank you for the quick reply.
I have one problem.
For end of day data is correct.
for live is indicator for last pivot is dot. see it picture.
thank you for answer
May 12th, 2014, 01:45 PM
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627
georgex,
I am not exactly following your problem, but you can try using this instead:
Code
DayOfWeek(Date) < DayOfWeek(Date[1])
By the way may I ask where you got this indicator? As it appears to mainly be code I wrote in 2007 and someone just deleted my notes.
Regards,
ABCTG
May 12th, 2014, 01:58 PM
Prag/czechrepublic
Experience: Intermediate
Platform: Multicharts, NinjaTrader
Broker: IB
Trading: Currency
Posts: 3 since Jan 2014
Thanks Given: 0
Thanks Received: 1
May 12th, 2014, 02:05 PM
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627
Thanks, I hope you didn't pay for it as it should be free.
Regards,
ABCTG
georgex
June 29th, 2014, 03:28 PM
Melbourne, Australia
Experience: Intermediate
Platform: NT8, Multicharts,Sierra
Broker: CQG, IB
Trading: YM,CL,GC,6E,6J
Posts: 97 since Mar 2013
Thanks Given: 85
Thanks Received: 60
Hi ABCTG,
How easy it is to insert an input into your v3 of this code where you can turn off the plots for the previous days.
It seems rather cluttered on a higher timeframe chart (eg 30000 ticks on ES) to have every pivot point going back to the start of the chart displayed and it would be great to noplot the previous days or the previous days except yesterday.
June 29th, 2014, 05:26 PM
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627
Hi hoolio,
not very hard. Do you know a bit of EasyLanguage ? You would draw the lines once when you execute the code the first time and then only update the location on later dates.
In case you need help with that post back here and we can modify what you have so far.
Regards,
ABCTG
hoolio
Hi ABCTG,
How easy it is to insert an input into your v3 of this code where you can turn off the plots for the previous days.
It seems rather cluttered on a higher timeframe chart (eg 30000 ticks on ES) to have every
pivot point going back to the start of the chart displayed and it would be great to noplot the previous days or the previous days except yesterday.
July 14th, 2014, 08:55 PM
Melbourne, Australia
Experience: Intermediate
Platform: NT8, Multicharts,Sierra
Broker: CQG, IB
Trading: YM,CL,GC,6E,6J
Posts: 97 since Mar 2013
Thanks Given: 85
Thanks Received: 60
Thanks ABCTG
A belated reply I know.
I was totally oblivious to the "once" keyword.
Your tutorial number 5 on the ABC website enlightened me
Last Updated on July 14, 2014