Indicator for strategy
Forums › ProRealTime English forum › ProOrder support › Indicator for strategy
- This topic has 5 replies, 4 voices, and was last updated 3 years ago by
JC_Bywan.
-
-
12/29/2021 at 3:41 PM #184099
Hello
I would need someone to help me with this indicator found in prorealcode.
It seems to me an excellent indicator and I would like to use it to be able to build a strategy but unfortunately I do not understand why it appears to me this way.
I enclose below what appears to me and what should appear.Thank you
12/29/2021 at 3:43 PM #1841021234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162// --- Settingsn=120 // time span in minutes, choose parameter n equal to 15, 30, 60, 120, 180 or 240start=080000 // time start in HHMMSS formatfinish=220000 // time end in HHMMSS format// --- End of settings//if n=15 thenchangebarre= openminute[1]>openminute or (openminute[1]<15 and openminute>=15) or (openminute[1]<30 and openminute>=30) or (openminute[1]<45 and openminute>=45)deltamin=1500elsif n=30 thenchangebarre= openminute[1]>openminute or (openminute[1]<30 and openminute>=30)deltamin=3000elsif n=60 thenchangebarre= openminute[1]>openminutedeltamin=10000elsif n=120 thendeltamin=20000hrs=(opentime-start)/deltaminchangebarre= (hrs[1]<1 and hrs>=1) or (hrs[1]<2 and hrs>=2) or (hrs[1]<3 and hrs>=3) or (hrs[1]<4 and hrs>=4) or (hrs[1]<5 and hrs>=5) or (hrs[1]<6 and hrs>=6) or (hrs[1]<7 and hrs>=7) or (hrs[1]<8 and hrs>=8) or (hrs[1]<9 and hrs>=9) or (hrs[1]<10 and hrs>=10) or (hrs[1]<11 and hrs>=11)elsif n=180 thendeltamin=30000hrs=(opentime-start)/deltaminchangebarre= (hrs[1]<1 and hrs>=1) or (hrs[1]<2 and hrs>=2) or (hrs[1]<3 and hrs>=3) or (hrs[1]<4 and hrs>=4) or (hrs[1]<5 and hrs>=5) or (hrs[1]<6 and hrs>=6) or (hrs[1]<7 and hrs>=7)elsif n=240 thendeltamin=40000hrs=(opentime-start)/deltaminchangebarre= (hrs[1]<1 and hrs>=1) or (hrs[1]<2 and hrs>=2) or (hrs[1]<3 and hrs>=3) or (hrs[1]<4 and hrs>=4) or (hrs[1]<5 and hrs>=5)elseDRAWTEXT("n must be 15, 30, 60, 120, 180 or 240", barindex, close)endif//if changebarre thenstoque=barchangebarchange=barindexmyhigh=highest[barchange-stoque](high)[1]mylow=lowest[barchange-stoque](low)[1]myclose=close[1]endif//if opentime>=start+deltamin and opentime<finish thenPPcama=mycloseR1cama=myclose+(myhigh-mylow)*1.1/12R2cama=myclose+(myhigh-mylow)*1.1/6R3cama=myclose+(myhigh-mylow)*1.1/4R4cama=myclose+(myhigh-mylow)*1.1/2S1cama=myclose-(myhigh-mylow)*1.1/12S2cama=myclose-(myhigh-mylow)*1.1/6S3cama=myclose-(myhigh-mylow)*1.1/4S4cama=myclose-(myhigh-mylow)*1.1/2elsePPcama=0R1cama=0R2cama=0R3cama=0R4cama=0S1cama=0S2cama=0S3cama=0S4cama=0endifRETURN PPcama AS "PP Camarilla", R1cama AS "R1 Camarilla", R2cama AS "R2 Camarilla", R3cama AS "R3 Camarilla", R4cama AS "R4 Camarilla", S1cama AS "S1 Camarilla", S2cama AS "S2 Camarilla", S3cama AS "S3 Camarilla", S4cama AS "S4 Camarilla"This is the code I didn’t put above.
12/29/2021 at 5:07 PM #184106Because if any value is 0, it’s quite out of scale, compared to price.
Tick the option shown in my pic.
12/29/2021 at 5:13 PM #18410812/29/2021 at 5:16 PM #18410912/29/2021 at 8:42 PM #184139Not related to the resolved question, but there’s a bug at line 32 above (or line 38 in the library post https://www.prorealcode.com/prorealtime-indicators/intraday-flexible-camarilla-pivot-points/), it should be:
1if changebarre or (opentime[1]=start) thenNot sure why it’s in there, it’s ok in a modified version in the comments below the post. I guess I fixed it at the time while making the draft and didn’t amend too the already copied code in the draft. My apologies.
-
AuthorPosts
Find exclusive trading pro-tools on