Inside and outsidebars
Forums › ProRealTime English forum › ProBuilder support › Inside and outsidebars
- This topic has 4 replies, 3 voices, and was last updated 4 years ago by imokdesign.
-
-
12/06/2020 at 10:44 PM #152771
Hello together, i have difficulties to get an indikator run. I want to programm an Inside and outsidebar Range (Book: Das große buch der Markttechnik) indikator (look at the screenshot example i mannualy made). 🙂
Inside Bars and Outsidebar Range123456789101112131415161718192021// Definition der Insidebar-Rangea = High[4]b = Low[4]MyRange = a - b// Condition Inside- und Outsidebarc1 = MyRange >= Closec2 = MyRange < Close// Signal Inside- oder OutsidebarIF c1 THENa = 1 // DRAWARROWUP (x1, y1) COLOURED (R, V, B, a)ELSIF c2 THENa = -1 // DRAWARROWDOWN (x1, y1) COLOURED (R, V, B, a)ELSEa = 0ENDIFReturn a). The signal shoult be generate if a (inside)bar Leafs the range from the outsidebar with a close is higher as the high of the outsidebar-Range.
Here is my code. unfortunately my indicator shows nothing Should i work with a “BREAK”?
12/06/2020 at 10:55 PM #152773… I see in line three and four, there is still a [4]. It shouldn’t be there. But I don’t understand how to write it that it don’t limit the Range to a set number of bars.
12/06/2020 at 11:35 PM #152782You need to define exactly what an ‘Inside and outsidebar Range’ is. In your image you have candles followed by what I would call an inside candle (the high and low did not break the previous high and low) but also candles that did break the previous high and low as shown by the arrows in the image.
12/07/2020 at 12:34 AM #152787I dont quite understand 100% what your indicator should do but this code would signal when the close is higher or lower than the previous 4 bar highest-lowest range :
123456789101112131415161718192021// Definition der Insidebar-Rangea = Highest[4](high)[1]b = Lowest[4](low)[1]MyRange = a - b// Condition Inside- und Outsidebarc1 = (close - b ) > MyRangec2 = (a - close ) > MyRange// Signal Inside- oder OutsidebarIF c1 THENa = 1 // DRAWARROWUP (x1, y1) COLOURED (R, V, B, a)ELSIF c2 THENa = -1 // DRAWARROWDOWN (x1, y1) COLOURED (R, V, B, a)ELSEa = 0ENDIFReturn a12/08/2020 at 12:39 AM #152927I dont quite understand 100% what your indicator should do
Its from a thick Book called “Das große Buch der Markttechnik”. Try to explain it in a few words. Its a part of a classical mehtod of a Candle-Trailingstop for Trading the Progression or at the last high/low of a Trend. It try to simulate a syntheticly Trendstop (at the low/highs) in a sub-trend. For example the Signal starts with a Reversalbar with a stop under the Candle. As soon we has an inside bar, the stop get one candle back and waits there until a close leave the insidebar Range. So its nealy the same if you would go down in a smaller timeframe and trade the trend with lower lows or higher highs (trend in a trend) #Dow theorie. Maby these links can give you a good visulation:
https://www.att-trading.com/trading-wiki/markttechnik/innenstab/
https://www.mql5.com/de/market/product/38491?source=Market+Product+Form+Author#description
http://markttechnik.net/wp-content/uploads/2015/08/markttechnik-innenstab.png
@Vonasi @pableitor thanks for your help. In my head I know what i want to do, but sometimes its not easy for me to get the logical sequence of a code. 🙂 -
AuthorPosts
Find exclusive trading pro-tools on