Intra day camarilla Pivots not matching chart display
Forums › ProRealTime English forum › ProBuilder support › Intra day camarilla Pivots not matching chart display
- This topic has 23 replies, 4 voices, and was last updated 2 years ago by Paulg999.
-
-
09/28/2022 at 3:57 PM #201587
If you want to use different time frames, you have to put that above your code:
TimeFrame(5 minutes)
// Conditions to enter long positions
indicator1 = ExponentialAverage[8](close)
indicator2 = (High[1] + Low[1] + Close[1])/3
c1 = (indicator1[1] < indicator2[1])
indicator3 = ExponentialAverage[8](close)
indicator4 = (High[1] + Low[1] + Close[1])/3
c2 = (indicator3 > indicator4)TimeFrame(15 minutes)
indicator5 = Close[1] + (High[1]-Low[1]) * (1.1 / 4)
c3 = (close > indicator5)
indicator6 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)
c4 = (low[1] < indicator6[1])
indicator7 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)
c5 = (close > indicator7)1 user thanked author for this post.
09/28/2022 at 5:16 PM #201594Thanks JS,
I haven’t made myself clear.
The code is all based on the 1m chart . So visually, I have two sets of camarilla indicators on my chart (5m & 15m). On this 1m chart I have a set of criteria I want to meet based on 5m cam levels & another set of conditions to meet based on the 15m cam levels.
// Conditions to enter long positions
//Set of criteria to meet on the 5m cam
indicator1 = ExponentialAverage[8](close)
indicator2 = (High[1] + Low[1] + Close[1])/3
c1 = (indicator1[1] < indicator2[1])
indicator3 = ExponentialAverage[8](close)
indicator4 = (High[1] + Low[1] + Close[1])/3
c2 = (indicator3 > indicator4)//Set of criteria to meet on the 15m cam
indicator5 = Close[1] + (High[1]-Low[1]) * (1.1 / 4)
c3 = (close > indicator5)
indicator6 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)
c4 = (low[1] < indicator6[1])
indicator7 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)
c5 = (close > indicator7)Thanks for your patience.
09/28/2022 at 5:36 PM #201595Put your indicators under the correct time frame and put your conditions under time frame “default” (1 minute)
TimeFrame(15 minutes)
indicator5 = Close[1] + (High[1]-Low[1]) * (1.1 / 4)
indicator6 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)
indicator7 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)
TimeFrame(5 minutes)
indicator1 = ExponentialAverage[8](close)
indicator2 = (High[1] + Low[1] + Close[1])/3
indicator3 = ExponentialAverage[8](close)
indicator4 = (High[1] + Low[1] + Close[1])/3
TimeFrame(Default)
c1 = (indicator1[1] < indicator2[1])
c2 = (indicator3 > indicator4)
c3 = (close > indicator5)
c4 = (low[1] < indicator6[1])
c5 = (close > indicator7)
09/28/2022 at 6:35 PM #20160309/28/2022 at 6:42 PM #20160509/28/2022 at 10:19 PM #201613Hi JS,
I got a chance to re-enter my code in the right order & re-run it but something is still drastically wrong (with my interpretation no doubt).
I have attached the itf file along with a summary of the strategy & the code written. Underneath the summary, I have given an example trigger of both short & long along with a PNG file showing each example
CP = Current Period / PP = Previous Period.
Long Short Using 15m [Camarilla Levels] Using 15m [Camarilla Levels] Low < S2 (PP) High > R2 (PP) Close > R2 (CP) Close < S2 (CP) Using 5m [Camarilla Levels] Using 5m [Camarilla Levels] 8ema < [Pivot Point] (PP) 8ema > [Pivot Point] (PP) 8ema > [Pivot Point] (CP) 8ema < [Pivot Point] (CP) Close > [R3] (CP) Close < [S3] (CP) (Default) (Default) Close < BB20-2.3 Upper (Boll2) (CP) Close < BB20-2.3 Lower (Boll2) (CP) 55ema < 144ema (CP) 55ema > 144ema (CP) 8ema < 21sma (CP) 8ema > 21sma (CP) 8ema < 55ema (CP) 8ema > 55ema (CP) Close < 55ema (CP) Close > 55ema (CP) Close < 21sma (CP) Close > 21sma (CP) Exit = Close (CP) < Low (PP) Exit= Close (CP) > High (PP) US30 26-09-22 1m @ 17:45 US30 22-09-22 1m @ 20:15 Long AT.1 v2 Program12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsTimeFrame(15 minutes)indicator1 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)c1 = (low[1] < indicator1[1])indicator2 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)c2 = (close > indicator2)TimeFrame(5 minutes)indicator3 = ExponentialAverage[8](close)indicator4 = (High[1] + Low[1] + Close[1])/3c3 = (indicator3[1] < indicator4[1])indicator5 = ExponentialAverage[8](close)indicator6 = (High[1] + Low[1] + Close[1])/3c4 = (indicator5 > indicator6)indicator7 = Close[1] + (High[1]-Low[1]) * (1.1 / 4)c5 = (close > indicator7)TimeFrame(Default)indicator8 = Average[20](close)+2.3*std[20](close)c6 = (close < indicator8)indicator9 = ExponentialAverage[55](close)indicator10 = ExponentialAverage[144](close)c7 = (indicator9 < indicator10)indicator11 = ExponentialAverage[8](close)indicator12 = Average[21](close)c8 = (indicator11 < indicator12)indicator13 = ExponentialAverage[8](close)indicator14 = ExponentialAverage[55](close)c9 = (indicator13 < indicator14)indicator15 = ExponentialAverage[55](close)c10 = (close < indicator15)indicator16 = Average[21](close)c11 = (close < indicator16)IF c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8 AND c9 AND c10 AND c11 THENBUY 1 PERPOINT AT MARKETENDIF// Conditions to exit long positionsc12 = (close < low[1])IF c12 THENSELL AT MARKETENDIF// Conditions to enter short positionsTimeFrame(15 minutes)indicator17 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)c13 = (high[1] > indicator17[1])indicator18 = Close[1] + (High[1]-Low[1]) * (1.1 / 6)c14 = (close < indicator18)TimeFrame(5 minutes)indicator19 = ExponentialAverage[8](close)indicator20 = (High[1] + Low[1] + Close[1])/3c15 = (indicator19[1] > indicator20[1])indicator21 = ExponentialAverage[8](close)indicator22 = (High[1] + Low[1] + Close[1])/3c16 = (indicator21 < indicator22)indicator23 = Close[1] + (High[1]-Low[1]) * (1.1 / 4)c17 = (close < indicator23)TimeFrame(Default)indicator24 = Average[20](close)-2.3*std[20](close)c18 = (close > indicator24)indicator25 = ExponentialAverage[55](close)indicator26 = ExponentialAverage[144](close)c19 = (indicator25 > indicator26)indicator27 = ExponentialAverage[8](close)indicator28 = Average[21](close)c20 = (indicator27 > indicator28)indicator29 = ExponentialAverage[8](close)indicator30 = ExponentialAverage[55](close)c21 = (indicator29 > indicator30)indicator31 = ExponentialAverage[55](close)c22 = (close > indicator31)indicator32 = Average[21](close)c23 = (close > indicator32)IF c13 AND c14 AND c15 AND c16 AND c17 AND c18 AND c19 AND c20 AND c21 AND c22 AND c23 THENSELLSHORT 1 PERPOINT AT MARKETENDIF// Conditions to exit short positionsc24 = (close > high[1])IF c24 THENEXITSHORT AT MARKETENDIFLets see what this uncovers……..
09/30/2022 at 4:17 AM #20168410/02/2022 at 11:48 AM #20177110/17/2022 at 11:03 AM #202673 -
AuthorPosts
Find exclusive trading pro-tools on