Bracket orders (signals upon LO&HI of one candle)
Forums › ProRealTime English forum › ProBuilder support › Bracket orders (signals upon LO&HI of one candle)
- This topic has 6 replies, 3 voices, and was last updated 1 month ago by Watanabix.
-
-
11/28/2024 at 1:01 AM #240835
Hello traders,
I am trying to build an indicator that will give me the high and the low of a specific candle. I have tried using time but the highs and low would always be of the next candle so I gave up and am now using te number of the candle (perhaps not a good ideia for future testing in a strategy, i don’t know). It is now drawing 2 horizontal lines of the high and low but the lines extend until the next the next same candle in the next trading day.
- is it possible to limit the horizontal lines to the end of the session, in this case 160000 in New York, like if the highs and lows would reset at the end of the session (and not be shown on the chart)?
- is there a way to use the time interval of the candle (in this case 103000-104500) instead of the number (just to add more flexibility)?
- also, I assume that I can then use this indicator in a strategy to use buy and sell orders (this is the next step). Please let me know otherwise.
123456if IntradayBarIndex =42 THENmaxprice = highminprice = lowENDIFreturn maxprice as "maxprice", minprice as "minprice"PS: I am attaching the picture of how it looks in the chart
Many thanks in case you can help
11/28/2024 at 10:13 AM #240843Hi, you can take a look at this article describing an indicator that updates based on time and the highs and lows reached in a fixed time range. https://www.prorealcode.com/prorealtime-indicators/ict-killzones-and-pivots/
1 user thanked author for this post.
11/28/2024 at 10:41 PM #240865Hello,
- When using IB as your broker and you only want to view the Regular Trading Hours (RTH), you can use a “Full (no Globex)” contract. The “no Globex” option shows only the regular trading hours. The standard “Full” contract includes both RTH and ETH.
If this is not what you intend, you can hide the lines with a “trick.” To make the lines invisible, you can set them to “transparent” using the “alpha” parameter (see code). - Refer to the code: using “OpenTime,” you can determine the opening time of the candle.
- Yes, in most cases, the indicator serves as the basis of a strategy. With the ProOrder module, you can add positions and money management.
Hi-Low lines123456789101112If OpenTime=103000 thenmaxprice = highminprice = lowEndIfIf OpenTime=>103000 and OpenTime<=160000 thenalpha=255elsealpha=0ENDIFreturn maxprice as "maxprice" coloured(255,0,0,alpha), minprice as "minprice" coloured(0,255,0,alpha)11/29/2024 at 9:10 PM #240917Hi Ivan,
Muchisimas gracias (many thanks)!
That will be helpful so I will try to adapt to what I need.
I tried to understand how/why are you using tthe variables “limitday” and “opentrueday”. Do you mind helping me out on this one?
Buen finde (hava great weekend).
Saludos (regards)
tiago
11/29/2024 at 9:41 PM #24091912/02/2024 at 9:46 AM #240964Hi!
limitday: Defines a specific moment at the end of the trading day (e.g., market close) to perform final calculations, such as drawing lines or segments on the chart. For example, it marks support or resistance levels accumulated during the session.
openTrueDay: Sets the opening time of the trading day. It is used to initialize values at the beginning of a new day, such as the opening price (openTD) and the bar index (barTD).
These variables help structure the indicator within trading sessions and highlight key start and end points.
1 user thanked author for this post.
12/02/2024 at 9:15 PM #240997 -
AuthorPosts
Find exclusive trading pro-tools on