ProRealTime Programming Trader Session Pivots

mrosbiston

Junior member
Messages
12
Likes
0
i wish to be helped with some programming - this is in the VB language, im afraid im not so good at programming, although i wrote a script for weekly pivots i cannot alter it to trader session pivots.... help!!!

in return i will explain how i use the session pivots (it's pretty simple) - at the moment i am drawing them manually

i am trying to code a trading session pivot point. i have attempted to code but i am a novice in this respect. what i wish to be able to plot is the pivot point of each trading session. i want the (H+L+C)/3 pivot for the asian session (12am gmt - 8am gmt) and the london session (8am gmt - 4pm gmt)

i do not need R1,S1 etc - just P

i wish to be able to plot this single line - so that the asian session pivot occurs in the timeframe of the london session.

the (H+L+C)/3 - would be High[8] or something like that for the 480 minutes of data.

i would like it as an indicator so i do not have to manually plot it everyday.

i hope i have been descriptive enough - this technique is very useful for gauging intra-day direction and can be used along-side trader pivots. you would also see that if combined with divergence it can be a useful S/R zone for a short change in market direction. Hedge Funds use this technique - although not quite as i describe it.

here is my original VB code - if anyone can alter it i will be indebted to them and i hope others can use this as well. I'm sure it could also be used for MT4 - although i don't use MT4 - so the prorealtime version would be appreciated.

James

ONCE WK = 0
once sw = 0

if DayOfWeek < DayOfWeek[1] and wk = 1 then
sw = sw +1
wk = 0
C = pwC
L = pwL
H = pwH
pwH =high
pwL = low
endif

pwH = MAX(Dhigh(0), pwH)
pwL = MIN(Dlow(0), pwL)
pwC = Dclose(0)

if DayOfWeek > 1 then
wk = 1
endif


P = (H + L + C)/3
R03 = H + 2 * (P - L)
R02 = P + (H - L)
R01 = (P * 2) - L
S01 = (P * 2) - H
S02 = P - (H - L)
S03 = L - 2 * (H - P)

if sw < 2 then
P = undefined
R01 = undefined
R02 = undefined
R03 = undefined
S01 = undefined
S02 = undefined
S03 = undefined
endif

if sw > 1 then
if wk[1] > wk then
barCountStart = barIndex
endif
barcount = barIndex - barCountStart
HH = highest[barcount +1](High)
LL = lowest[barcount +1](low)

if R02 > HH then
R03 = R02
endif
if R01 > HH then
R02 = R01
R03 = R02
endif
if S02 < LL then
S03 = S02
endif
if S01 < LL then
S02 = S01
S03 = S02
endif
endif

RETURN R03 Coloured(255,0,0) AS "R3 WEEK", R02 Coloured(255,0,0) AS "R2 WEEK", R01 Coloured(255,0,0) AS "R1 WEEK", P AS "PP WEEK", S01 Coloured(0,200,0) AS "S1 WEEK", S02 Coloured(0,200,0) AS "S2 WEEK", S03 Coloured(0,200,0) AS "S3 WEEK"
 
i wish to be helped with some programming - this is in the VB language, im afraid im not so good at programming, although i wrote a script for weekly pivots i cannot alter it to trader session pivots.... help!!!

in return i will explain how i use the session pivots (it's pretty simple) - at the moment i am drawing them manually

i am trying to code a trading session pivot point. i have attempted to code but i am a novice in this respect. what i wish to be able to plot is the pivot point of each trading session. i want the (H+L+C)/3 pivot for the asian session (12am gmt - 8am gmt) and the london session (8am gmt - 4pm gmt)

i do not need R1,S1 etc - just P

i wish to be able to plot this single line - so that the asian session pivot occurs in the timeframe of the london session.

the (H+L+C)/3 - would be High[8] or something like that for the 480 minutes of data.

i would like it as an indicator so i do not have to manually plot it everyday.

i hope i have been descriptive enough - this technique is very useful for gauging intra-day direction and can be used along-side trader pivots. you would also see that if combined with divergence it can be a useful S/R zone for a short change in market direction. Hedge Funds use this technique - although not quite as i describe it.

here is my original VB code - if anyone can alter it i will be indebted to them and i hope others can use this as well. I'm sure it could also be used for MT4 - although i don't use MT4 - so the prorealtime version would be appreciated.

James

ONCE WK = 0
once sw = 0

if DayOfWeek < DayOfWeek[1] and wk = 1 then
sw = sw +1
wk = 0
C = pwC
L = pwL
H = pwH
pwH =high
pwL = low
endif

pwH = MAX(Dhigh(0), pwH)
pwL = MIN(Dlow(0), pwL)
pwC = Dclose(0)

if DayOfWeek > 1 then
wk = 1
endif


P = (H + L + C)/3
R03 = H + 2 * (P - L)
R02 = P + (H - L)
R01 = (P * 2) - L
S01 = (P * 2) - H
S02 = P - (H - L)
S03 = L - 2 * (H - P)

if sw < 2 then
P = undefined
R01 = undefined
R02 = undefined
R03 = undefined
S01 = undefined
S02 = undefined
S03 = undefined
endif

if sw > 1 then
if wk[1] > wk then
barCountStart = barIndex
endif
barcount = barIndex - barCountStart
HH = highest[barcount +1](High)
LL = lowest[barcount +1](low)

if R02 > HH then
R03 = R02
endif
if R01 > HH then
R02 = R01
R03 = R02
endif
if S02 < LL then
S03 = S02
endif
if S01 < LL then
S02 = S01
S03 = S02
endif
endif

RETURN R03 Coloured(255,0,0) AS "R3 WEEK", R02 Coloured(255,0,0) AS "R2 WEEK", R01 Coloured(255,0,0) AS "R1 WEEK", P AS "PP WEEK", S01 Coloured(0,200,0) AS "S1 WEEK", S02 Coloured(0,200,0) AS "S2 WEEK", S03 Coloured(0,200,0) AS "S3 WEEK"

Hello,
are you still looking for the session Pivots, I can help you. I made indicators for all Pivots you even can exclude the Weekend Data.
So let me know if want my code for the session pivots - or any of my other indicators.
Barbara
 
Apologies if I am in the wrong forum section..............but maybe someone can help.
I am interested in a trading method called the "Dunnigan"
"One Way Thrust" method. I have found links to the script in esignal language and also in Tradestation language but have been unable trace any for the ProRealTime language which I use as my charting package provided by IGindex. Can anyone suggest any place where I can get this method script for ProRealtime please?.
Anticipated Thanks
Dennis
 
I don´t know the Dunnigan Method, but I could try to make a script.
Session Pivots I have done already
Barbara
 
Thanks for response.
Like I said I have link to Esignal script and Tradestation script for the particular method but have
been unable trace any for the Prosignal language. It appears to be a very extensive indictor judging by the list that appears from these other prog languages. The truth is that I would not know where to begin in explaining what the method involves other than the actual name obviously. Here is a link to the method and some Tradestation language script included.
http://findarticles.com/p/articles/mi_qa5282/is_199811/ai_n24338273/?tag=mantle_skin;content

Dennis
 
Ok, I will look at it during the weekend. But I can tell you already that the PRT language is limited.
Barbara
 
Well the fact that you are willing to look at it is enough for me. I know I would never be able to translate that into the language even if the PRT had that provision for it anyway. So again, thanks
for taking the time to have a look.
Dennis
 
Well the fact that you are willing to look at it is enough for me. I know I would never be able to translate that into the language even if the PRT had that provision for it anyway. So again, thanks
for taking the time to have a look.
Dennis

Sorry for the delay, I had a quick look at it and I think it can be done in ProRealtime. You can email me if you like
Barbara
 
Sorry for the delay, I had a quick look at it and I think it can be done in ProRealtime. You can email me if you like
Barbara

Thanks for your reply. That is ok, I will attempt a very basic indicator carrying the conditions or at least some of them anyway. It wont be a professional outcome for sure but I will try and translate the conditions onto some form of indicator. Thanks.
 
Yes I do. As a matter of fact you can code much more with Mt4 than you can in PRT. PRT is the poorest programming language I know.
Barbara

OK, I am trading a system manually that generates entry signals on the hour candle, because I'm not always at my computer on the hour I am missing signals. I am still live forward testing at the moment, but it is looking promising. I would be interested in getting it coded in to an EA. I don't think it is that complicated, but then I know nothing about programming. Perhaps you could PM me about writing the EA.

Thanks

Andy
 
OK, I am trading a system manually that generates entry signals on the hour candle, because I'm not always at my computer on the hour I am missing signals. I am still live forward testing at the moment, but it is looking promising. I would be interested in getting it coded in to an EA. I don't think it is that complicated, but then I know nothing about programming. Perhaps you could PM me about writing the EA.

Thanks

Andy

I would PM you if you can tell me how I do that.
Thanks
Barbara
 
Hello,
are you still looking for the session Pivots, I can help you. I made indicators for all Pivots you even can exclude the Weekend Data.
So let me know if want my code for the session pivots - or any of my other indicators.
Barbara

Barbara,

I am looking for daily, weekly and monthly pivots including mid pivots that can handle weekend data. I understand you have coded these and would be very grateful if you can let me have a copy of the probuilder code.
 
Sorry in advance if this is the wrong thread to ask.

Does anyone know if a "Hilbert Sinewave Oscillator" has been coded for MT4?

Any help much appreciated.:)
 
Top