Automatic horizontal ray plotting
Forums › ProRealTime English forum › ProBuilder support › Automatic horizontal ray plotting
- This topic has 14 replies, 4 voices, and was last updated 1 year ago by Baguouse.
-
-
10/30/2022 at 4:39 PM #203224
Hi Gentlemen,
I use a powerful method to define support and resistance levels.
I’d like to automatically plot horizontal rays in order to define them. I currently do it manually but it’s a hassle.
First let’s define a breakout:
Look at the ¨breakout¨ image.
Candle 2 is completely below the high of candle 1 (high [candle2] < high[candle1])
AND
Candle 3 closed below the low of candle 2 (close [candle3] < low[candle2])
AND
Candle 4 makes a new low vs candle 3 (low [candle4] < low[candle3])
There is breakout of the green ray there so this one isn’t valid and shouldn’t be drawn.
Now let’s define a NO breakout:
Look at the ¨No breakout¨ image.
Candle 2 is completely below the high of candle 1 (high [candle2] < high[candle1])
AND
Candle 3 didn’t close below the low of candle 2 (close [candle3] > low[candle2]) OR Candle 3 closed below the low of candle 2 (close [candle3] < low[candle2])
AND
Candle 4 didn’t make a new low vs candle 3 (low [candle4] > low[candle3])
There is No breakout of the green ray there, so this one is valid, and that ray should be drawn. On top of that candle 4 closed above the ray (close [candle4] > high[candle1]) so it validates the line for good, meaning that if we breakout that ray to the downside, it should stay in place and a new dynamic ray should be created until validated.
Basically, the green horizontal ray is showing the level that the bears couldn’t breakout.
This works also on the upside, but highs have to be used instead of the low in the formula.
I manually plot on daily, weekly, Monthly, quarterly and yearly.
I’ve attached an example of what I manually plotted on SPX.
Do you think it is possible to code such on chart indicator?
If so, can anyone help?
Thanks in advance.
Cheers.
Franck.
10/30/2022 at 4:44 PM #20322710/30/2022 at 4:58 PM #203229As to the BREAKOUT pic, the candle PRIOR to candle 3 closed below candle 2, why didn’t you label it?
1 user thanked author for this post.
10/30/2022 at 5:17 PM #20323010/30/2022 at 5:28 PM #20324110/30/2022 at 5:35 PM #203251Ok, still as to the BREAKOUT picture you wrote “Candle 2 is completely below the high of candle 1 (high [candle2] < high[candle1])” did you mean low?
Anyway why did you start counting candles from candle 1? What are the conditions to name it 1?
Then what are the conditions to name candle 2 as 2? etc… for all the other ones you mentioned?
Pics can be useful, but a detailed description of conditions required is mandatory to understand what you mean.
10/30/2022 at 5:48 PM #203255Well, I labelled candle 1 as ¨1¨ because I am drawing the ray on the high of that candle when there is ¨no breakout¨. I named it also ¨1¨in the ¨breakout¨config as I wanted to show the difference between a breakout and a no breakout.
Basically I am drawing the level for which: a complete candle is below it, AND there is a close below the low of that complete candle on one of the subsequent candles; and there this no subsequent lower low below that subsequent candle.
I know it’s very hard to explain but I could show you a video call sharing my screen if not clear…
Grazie.
Franck.
10/31/2022 at 3:16 AM #20326710/31/2022 at 5:50 AM #203268Works on any instrument. Please check the BTC chart where you can see there was a sell signal on the 22nd of April 2021 with a subsequent retest of the resistance and a significant move downward (43% from the sell signal and 51% from the retest).
This could be used to create screeners as well to detect either a breakout or a retest post breakout.
Regards.
Franck.
10/31/2022 at 10:19 AM #20328510/31/2022 at 11:46 AM #20330410/31/2022 at 1:46 PM #203313I’ve attached a Monthly chart with only green lines and another with only red ones for the sake of clarity. On weekly or daily charts, it’d look too cluttered. But the principle is the same.
The video is clearer though, I think.
10/31/2022 at 8:38 PM #203329Hi @Baguouse
I tried to convert the “NO BreakOut” into the usual notation where, for example, the last Close is noted as Close[0] and the previous one as Close[1] and so on:
High[1] < High[0]
And
Close[2] > Low[1] or Close[2] < Low[1]
And
Low[3] > Low[2]
Remark:
Close[2] > Low[1] or Close[2] < Low[1]
is always true… (so not really a condition)
11/01/2022 at 3:43 AM #203334Hi JS,
Thanks for your support.
Well, it’s not that simple because the candle that will close below the low of candle 2 isn’t necessarily candle 3. It can take several candles for this to happen.
Have a look at the video below for better understanding.
TSLA 228.52000 ▲ 2022-10-31 05-11-42.mp4 – Google Drive
Cheers.
Franck.
02/23/2023 at 10:29 AM #210243Maybe the below better explains.
I want to automatically horizontal rays on chart. Here are the conditions:
1. The ray will be plotted and start on the low of Candle 1
2. Candle 2 is subsequent to Candle 1 is the first candle to have a low superior to Candle 1 low
3. Candles between Candle 1 and Candle 2 have a low inferior to Candle 1 low
4. Candles between Candle 1 and Candle 2 have a close superior to Candle 1 low 5.
Candle 3 is subsequent to Candle 2 is the first candle to have a close superior to Candle 2 high 6.
Candle 4 is subsequent to Candle 3 is the first candle to have a close inferior to Candle 1 low 7.
The ray can be plotted only when Candle 4 happened
-
AuthorPosts
Find exclusive trading pro-tools on