The support forum is built with (1) General and FAQ forums for common trading queries received from aspiring and experienced traders, and (2) forums for course video topics. How to Trade Price Action and How to Trade Forex Price Action videos are consolidated into common forums.
Brooks Trading Course social media communities
//@version=5 indicator('II-OIO-OO', overlay=true, max_labels_count = 500) pattern = "T" barZero = "" barMinusOne = "" barMinusTwo = "" if (high[1] >= high and low[1] <= low) barZero := "I" if (high[1] <= high and low[1] > low) or (high[1] < high and low[1] >= low) barZero := "O" if (high[2] >= high[1] and low[2] <= low[1]) barMinusOne := "I" if (high[2] <= high[1] and low[2] > low[1]) or (high[2] < high[1] and low[2] >= low[1]) barMinusOne := "O" barMinusTwo := "I" if (barZero == "I" and barMinusOne == "I") pattern := "ii" else if (barZero == "O" and barMinusOne == "O") pattern := "oo" else if (barZero == "I" and barMinusOne == "O" and barMinusTwo == "I") pattern := "ioi" else if (barZero == "I") pattern := "i" else if (barZero == "O") pattern := "o" else pattern := "" label.new(bar_index, high, style=label.style_none, text=pattern)
Thanks again PB.
Do you have a callsign in Trading view where perhaps you may have published all of these indicators?😀
Do you have a callsign in Trading view where perhaps you may have published all of these indicators?😀
Nah, can't be bothered.
I am getting an error message when adding this into the editor, can you please explain what I have to change so I can get it to work?? It points to line 25 and has this error message under it....... Mismatched input 'pattern' expecting 'end of line without line continuation'
Hello Kishan Patel, the same thing happened to me but I managed to fix it by deleting the space behind the troubleshooting "pattern" word and clicking on enter afterwards. I did the same thing for each following "pattern := " line and updated the script. I have no idea how, but it did solved this issue.
I would also like to thank you PB for this script.
Best regards.
This is very useful - many thanks.
For the errors, all of the pattern := lines should be indented so that the parser knows they're part of the if statement above.
Sorry for not replying sooner. I had written that code at the beginning of my TradingView journey... mostly without knowing what I was doing (some claim I still don't know what I'm doing).
Anyway, here's the current code that's running for me every day, if anybody still needs it...
//@version=5 indicator("II-IOI-OO", overlay=true, max_labels_count=500) pattern = "T" barZero = "" barMinusOne = "" barMinusTwo = "" var vOffset = true offset = (high - low) * 0.25 if (high[1] >= high and low[1] <= low) barZero := "I" if (high[1] <= high and low[1] > low) or (high[1] < high and low[1] >= low) barZero := "O" if (high[2] >= high[1] and low[2] <= low[1]) barMinusOne := "I" if (high[2] <= high[1] and low[2] > low[1]) or (high[2] < high[1] and low[2] >= low[1]) barMinusOne := "O" barMinusTwo := "I" if (barZero == "I" and barMinusOne == "I") pattern := "ii" else if (barZero == "O" and barMinusOne == "O") pattern := "oo" else if (barZero == "I" and barMinusOne == "O" and barMinusTwo == "I") pattern := "ioi" else if (barZero == "I") pattern := "i" else if (barZero == "O") pattern := "o" else pattern := "" if not vOffset vOffset := true l1 = label.new(bar_index, y = high + offset, style=label.style_none, text=pattern) label.set_textcolor(l1, color.red) else vOffset := false l1 = label.new(bar_index, y = high + offset * 1.5, style=label.style_none, text=pattern) label.set_textcolor(l1, color.red)