New PIVOT indicator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Re: New PIVOT indicator

Postby Patrick Sweet » Sun Nov 24, 2013 2:14 pm

Hi,
Stupid question, probably. I apologise in advance. But it should be quick and painless to answer.
In the current installation of Pivot, I think Camarilla is perhaps wrong (which means this is not a stupid question) or it is correct and I am reading the LUA code incorrectly, hense the likely apology. here is my reference question.

I think the line below is a 'comment' (none functioning) line in the lua file.....because is it preceeded with two dashes '--' and is in green text in the lua file

normal text....
elseif CalcMode == O_CAM then
green text ...***-- P[period] = (ref.high[prev_i] + ref.close[prev_i] + ref.low[prev_i]) / 3;***

Then what follows is P[period] = ref.close[prev_i];

If I understand it, in this implementation Camilla is using the previous close as P. To check this I looked that the values of P (daily) and values of closing bar (opening bar 17:00) and the Camilla P value is indeed the same as ref.close[prev_i].

My understanding is that P value for Camilla =
-- P[period] = (ref.high[prev_i] + ref.close[prev_i] + ref.low[prev_i]) / 3; and not simply the closing value of the previous period/day. (like for some others).

If my reading is correct, could we please make it so that the Camilla P value is like those used for .....?

if CalcMode == O_PIVOT or CalcMode == O_FIB or CalcMode == O_FLOOR then
P[period] = (ref.high[prev_i] + ref.close[prev_i] + ref.low[prev_i]) / 3;

Or set me straight on what is happening...please? Patrick

CODE FROM LUA FILE:......
pday = prev_i;
if CalcMode == O_PIVOT or CalcMode == O_FIB or CalcMode == O_FLOOR then
P[period] = (ref.high[prev_i] + ref.close[prev_i] + ref.low[prev_i]) / 3;
elseif CalcMode == O_CAM then
-- P[period] = (ref.high[prev_i] + ref.close[prev_i] + ref.low[prev_i]) / 3; (this text is in green)
P[period] = ref.close[prev_i];
Patrick Sweet
 
Posts: 72
Joined: Fri Apr 26, 2013 4:23 am

Re: New PIVOT indicator

Postby Patrick Sweet » Sun Nov 24, 2013 2:27 pm

Hi again,

I have been checking values for Classical P, Floor P and Fib P (calculated according to the P=(prevH+preClose+prevLow)/3 compared to simple P=prevClose, and on october 7th for example the diffence is 27pips.

I had to check for my own piece of mind that I was not splitting hairs over a difference without a significance, but I think this rates as a difference of significance (so I at least feel better about raising the finding).

Thanks,P
Patrick Sweet
 
Posts: 72
Joined: Fri Apr 26, 2013 4:23 am

Re: New PIVOT indicator

Postby Patrick Sweet » Sun Nov 24, 2013 4:20 pm

Hi Again, Again,
I beg your apology...but I found that MT4 uses Close as P.

MT4=
R4 = (H - L) X 1.1 / 2 + C
R3 = (H - L) X 1.1 / 4 + C
R2 = (H - L) X 1.1 / 6 + C
R1 = (H - L) X 1.1 / 12 + C
S1 = C - (H - L) X 1.1 / 12
S2 = C - (H - L) X 1.1 / 6
S3 = C - (H - L) X 1.1 / 4
S4 = C - (H - L) X 1.1 / 2

I trust you know by now that I understand there are multiple implementations.....
I wonder, would it be possible to actually ADD the (what many purport to be) original formula for Camarilla?

Where P is calculated like you calculate P for Classic, Floor, and Fib in the Pivot implementation??
And accept again my greatest gratitude for all your work!

Patrick
Patrick Sweet
 
Posts: 72
Joined: Fri Apr 26, 2013 4:23 am


Re: New PIVOT indicator

Postby nookie » Thu Feb 08, 2018 12:04 pm

Is it possible this to be in .mq4 ? Or already exists somewhere in this site ?
nookie
FXCodeBase: Graduate
 
Posts: 203
Joined: Tue May 24, 2011 12:50 pm


Re: New PIVOT indicator

Postby nookie » Fri Feb 09, 2018 5:53 pm

Yes, exactly, thanks !
nookie
FXCodeBase: Graduate
 
Posts: 203
Joined: Tue May 24, 2011 12:50 pm

Previous

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 8 guests