<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>نوشته های salar SS</title><link>https://virgool.ir/feed/@thesalarssmedya</link><description></description><language>fa</language><pubDate>2026-11-11 20:25:32</pubDate><image><url>https://files.virgool.ir/upload/users/1682664/avatar/avatar.png</url><title>salar SS</title><link>https://virgool.ir/@thesalarssmedya</link></image><item><title>salarsahragard</title><link>https://virgool.ir/@thesalarssmedya/salarsahragard-pdn1css9c6k7</link><description>// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0///@version=5indicator(title=&#39;Order Blocks&#39;, shorttitle=&#39;سفارش‌ها&#39;, overlay=true, max_boxes_count=20)_v = input.string(&#34;1.0.1&#34;, title=&#34;Version&#34;, options=[&#34;1.0.1&#34;], group=&#34;@amirambit&#34;, tooltip=&#34;@amirambit&#34;)sens = input.int(28, minval=1, title=&#39;حساسیت&#39;, group=&#39;Order Block&#39;, tooltip=&#39;هرچه عدد کمتر باشد، تعداد اردر بلاک های بیشتری روی نمودار نمایش داده می شود&#39;)sens /= 100//OB Colorscol_bullish = input.color(#5db49e, title=&#34;Bullish OB Border&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bullish_ob = input.color(color.new(#64C4AC, 85), title=&#34;Background&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bearish = input.color(#ab0000, title=&#34;Bearish OB Border&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)col_bearish_ob = input.color(color.new(#ab0000, 85), title=&#34;Background&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)// Alertsbuy_alert = input.bool(title=&#39;Buy Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes below the top of a bullish order block.&#39;)sell_alert = input.bool(title=&#39;Sell Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes above the bottom of a bearish order block.&#39;)// Delacring Variablesbool ob_created = falsebool ob_created_bull = falsevar int cross_index = na// Declaring Box Arraysvar box drawlongBox = navar longBoxes = array.new_box()var box drawShortBox = navar shortBoxes = array.new_box()// Custom Rate of Change (ROC) calculation. This is to calculate high momentum moves in the market.pc = (open - open[4]) / open[4] * 100// If the ROC crossover our Sensitivty input - Then create an Order Block// Sensitivty is negative as this is a Bearish OBif ta.crossunder(pc, -sens)    ob_created := true    cross_index := bar_index    cross_index// If the ROC crossover our Sensitivty input - Then create an Order Blockif ta.crossover(pc, sens)    ob_created_bull := true    cross_index := bar_index    cross_index// -------------------------------// Bearish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created and cross_index - cross_index[1] &gt; 5    float last_green = 0    float highest = 0    // Loop through the most recent candles and find the first GREEN (Bullish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &gt; open[i]            last_green := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawShortBox := box.new(left=bar_index[last_green], top=high[last_green], bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob, border_color=col_bearish, extend=extend.right)    array.push(shortBoxes, drawShortBox)// -------------------------------// Bullish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created_bull and cross_index - cross_index[1] &gt; 5    float last_red = 0    float highest = 0    // Loop through the most recent candles and find the first RED (Bearish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &lt; open[i]            last_red := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawlongBox := box.new(left=bar_index[last_red], top=high[last_red], bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob, border_color=col_bullish, extend=extend.right)    array.push(longBoxes, drawlongBox)// ----------------- Bearish Order Block -------------------// Clean up OB boxes and place alertsif array.size(shortBoxes) &gt; 0    for i = array.size(shortBoxes) - 1 to 0 by 1        sbox = array.get(shortBoxes, i)        top = box.get_top(sbox)        bot = box.get_bottom(sbox)        // If the two last closes are above the high of the bearish OB - Remove the OB        if close[1] &gt; top and close[2] &gt; top            array.remove(shortBoxes, i)            box.delete(sbox)        // Alerts        if high &gt; bot and sell_alert            alert(&#39;Price inside Bearish OB&#39;, alert.freq_once_per_bar)// ----------------- Bullish Clean Up -------------------// Clean up OB boxes and place alertsif array.size(longBoxes) &gt; 0    for i = array.size(longBoxes) - 1 to 0 by 1        sbox = array.get(longBoxes, i)        bot = box.get_bottom(sbox)        top = box.get_top(sbox)        // If the two last closes are below the low of the bullish OB - Remove the OB        if close[1] &lt; bot and close[2] &lt; bot            array.remove(longBoxes, i)// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0///@version=5indicator(title=&#39;Order Blocks&#39;, shorttitle=&#39;سفارش‌ها&#39;, overlay=true, max_boxes_count=20)_v = input.string(&#34;1.0.1&#34;, title=&#34;Version&#34;, options=[&#34;1.0.1&#34;], group=&#34;@amirambit&#34;, tooltip=&#34;@amirambit&#34;)sens = input.int(28, minval=1, title=&#39;حساسیت&#39;, group=&#39;Order Block&#39;, tooltip=&#39;هرچه عدد کمتر باشد، تعداد اردر بلاک های بیشتری روی نمودار نمایش داده می شود&#39;)sens /= 100//OB Colorscol_bullish = input.color(#5db49e, title=&#34;Bullish OB Border&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bullish_ob = input.color(color.new(#64C4AC, 85), title=&#34;Background&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bearish = input.color(#ab0000, title=&#34;Bearish OB Border&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)col_bearish_ob = input.color(color.new(#ab0000, 85), title=&#34;Background&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)// Alertsbuy_alert = input.bool(title=&#39;Buy Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes below the top of a bullish order block.&#39;)sell_alert = input.bool(title=&#39;Sell Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes above the bottom of a bearish order block.&#39;)// Delacring Variablesbool ob_created = falsebool ob_created_bull = falsevar int cross_index = na// Declaring Box Arraysvar box drawlongBox = navar longBoxes = array.new_box()var box drawShortBox = navar shortBoxes = array.new_box()// Custom Rate of Change (ROC) calculation. This is to calculate high momentum moves in the market.pc = (open - open[4]) / open[4] * 100// If the ROC crossover our Sensitivty input - Then create an Order Block// Sensitivty is negative as this is a Bearish OBif ta.crossunder(pc, -sens)    ob_created := true    cross_index := bar_index    cross_index// If the ROC crossover our Sensitivty input - Then create an Order Blockif ta.crossover(pc, sens)    ob_created_bull := true    cross_index := bar_index    cross_index// -------------------------------// Bearish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created and cross_index - cross_index[1] &gt; 5    float last_green = 0    float highest = 0    // Loop through the most recent candles and find the first GREEN (Bullish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &gt; open[i]            last_green := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawShortBox := box.new(left=bar_index[last_green], top=high[last_green], bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob, border_color=col_bearish, extend=extend.right)    array.push(shortBoxes, drawShortBox)// -------------------------------// Bullish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created_bull and cross_index - cross_index[1] &gt; 5    float last_red = 0    float highest = 0    // Loop through the most recent candles and find the first RED (Bearish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &lt; open[i]            last_red := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawlongBox := box.new(left=bar_index[last_red], top=high[last_red], bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob, border_color=col_bullish, extend=extend.right)    array.push(longBoxes, drawlongBox)// ----------------- Bearish Order Block -------------------// Clean up OB boxes and place alertsif array.size(shortBoxes) &gt; 0    for i = array.size(shortBoxes) - 1 to 0 by 1        sbox = array.get(shortBoxes, i)        top = box.get_top(sbox)        bot = box.get_bottom(sbox)        // If the two last closes are above the high of the bearish OB - Remove the OB        if close[1] &gt; top and close[2] &gt; top            array.remove(shortBoxes, i)            box.delete(sbox)        // Alerts        if high &gt; bot and sell_alert            alert(&#39;Price inside Bearish OB&#39;, alert.freq_once_per_bar)// ----------------- Bullish Clean Up -------------------// Clean up OB boxes and place alertsif array.size(longBoxes) &gt; 0    for i = array.size(longBoxes) - 1 to 0 by 1        sbox = array.get(longBoxes, i)        bot = box.get_bottom(sbox)        top = box.get_top(sbox)        // If the two last closes are below the low of the bullish OB - Remove the OB        if close[1] &lt; bot and close[2] &lt; bot            array.remove(longBoxes, i)// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0///@version=5indicator(title=&#39;Order Blocks&#39;, shorttitle=&#39;سفارش‌ها&#39;, overlay=true, max_boxes_count=20)_v = input.string(&#34;1.0.1&#34;, title=&#34;Version&#34;, options=[&#34;1.0.1&#34;], group=&#34;@amirambit&#34;, tooltip=&#34;@amirambit&#34;)sens = input.int(28, minval=1, title=&#39;حساسیت&#39;, group=&#39;Order Block&#39;, tooltip=&#39;هرچه عدد کمتر باشد، تعداد اردر بلاک های بیشتری روی نمودار نمایش داده می شود&#39;)sens /= 100//OB Colorscol_bullish = input.color(#5db49e, title=&#34;Bullish OB Border&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bullish_ob = input.color(color.new(#64C4AC, 85), title=&#34;Background&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bearish = input.color(#ab0000, title=&#34;Bearish OB Border&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)col_bearish_ob = input.color(color.new(#ab0000, 85), title=&#34;Background&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)// Alertsbuy_alert = input.bool(title=&#39;Buy Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes below the top of a bullish order block.&#39;)sell_alert = input.bool(title=&#39;Sell Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes above the bottom of a bearish order block.&#39;)// Delacring Variablesbool ob_created = falsebool ob_created_bull = falsevar int cross_index = na// Declaring Box Arraysvar box drawlongBox = navar longBoxes = array.new_box()var box drawShortBox = navar shortBoxes = array.new_box()// Custom Rate of Change (ROC) calculation. This is to calculate high momentum moves in the market.pc = (open - open[4]) / open[4] * 100// If the ROC crossover our Sensitivty input - Then create an Order Block// Sensitivty is negative as this is a Bearish OBif ta.crossunder(pc, -sens)    ob_created := true    cross_index := bar_index    cross_index// If the ROC crossover our Sensitivty input - Then create an Order Blockif ta.crossover(pc, sens)    ob_created_bull := true    cross_index := bar_index    cross_index// -------------------------------// Bearish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created and cross_index - cross_index[1] &gt; 5    float last_green = 0    float highest = 0    // Loop through the most recent candles and find the first GREEN (Bullish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &gt; open[i]            last_green := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawShortBox := box.new(left=bar_index[last_green], top=high[last_green], bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob, border_color=col_bearish, extend=extend.right)    array.push(shortBoxes, drawShortBox)// -------------------------------// Bullish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created_bull and cross_index - cross_index[1] &gt; 5    float last_red = 0    float highest = 0    // Loop through the most recent candles and find the first RED (Bearish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &lt; open[i]            last_red := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawlongBox := box.new(left=bar_index[last_red], top=high[last_red], bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob, border_color=col_bullish, extend=extend.right)    array.push(longBoxes, drawlongBox)// ----------------- Bearish Order Block -------------------// Clean up OB boxes and place alertsif array.size(shortBoxes) &gt; 0    for i = array.size(shortBoxes) - 1 to 0 by 1        sbox = array.get(shortBoxes, i)        top = box.get_top(sbox)        bot = box.get_bottom(sbox)        // If the two last closes are above the high of the bearish OB - Remove the OB        if close[1] &gt; top and close[2] &gt; top            array.remove(shortBoxes, i)            box.delete(sbox)        // Alerts        if high &gt; bot and sell_alert            alert(&#39;Price inside Bearish OB&#39;, alert.freq_once_per_bar)// ----------------- Bullish Clean Up -------------------// Clean up OB boxes and place alertsif array.size(longBoxes) &gt; 0    for i = array.size(longBoxes) - 1 to 0 by 1        sbox = array.get(longBoxes, i)        bot = box.get_bottom(sbox)        top = box.get_top(sbox)        // If the two last closes are below the low of the bullish OB - Remove the OB        if close[1] &lt; bot and close[2] &lt; bot            array.remove(longBoxes, i)            box.delete(sbox)        // Alerts        if low &lt; top and buy_alert            alert(&#39;Price inside Bullish OB&#39;, alert.freq_once_per_bar)            box.delete(sbox)        // Alerts        if low &lt; top and buy_alert            alert(&#39;Price inside Bullish OB&#39;, alert.freq_once_per_bar)            box.delete(sbox)        // Alerts        if low &lt; top and buy_alert            alert(&#39;Price inside Bullish OB&#39;, alert.freq_once_per_bar)</description><category>salar SS</category><author>salar SS</author><pubDate>Sat, 18 Jun 2022 00:33:10 +0430</pubDate></item><item><title>Order b</title><link>https://virgool.ir/@thesalarssmedya/order-b-yssfeqju21ay</link><description>// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0///@version=5indicator(title=&#39;Order Blocks&#39;, shorttitle=&#39;سفارش‌ها&#39;, overlay=true, max_boxes_count=20)_v = input.string(&#34;1.0.1&#34;, title=&#34;Version&#34;, options=[&#34;1.0.1&#34;], group=&#34;@amirambit&#34;, tooltip=&#34;@amirambit&#34;)sens = input.int(28, minval=1, title=&#39;حساسیت&#39;, group=&#39;Order Block&#39;, tooltip=&#39;هرچه عدد کمتر باشد، تعداد اردر بلاک های بیشتری روی نمودار نمایش داده می شود&#39;)sens /= 100//OB Colorscol_bullish = input.color(#5db49e, title=&#34;Bullish OB Border&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bullish_ob = input.color(color.new(#64C4AC, 85), title=&#34;Background&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bearish = input.color(#ab0000, title=&#34;Bearish OB Border&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)col_bearish_ob = input.color(color.new(#ab0000, 85), title=&#34;Background&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)// Alertsbuy_alert = input.bool(title=&#39;Buy Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes below the top of a bullish order block.&#39;)sell_alert = input.bool(title=&#39;Sell Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes above the bottom of a bearish order block.&#39;)// Delacring Variablesbool ob_created = falsebool ob_created_bull = falsevar int cross_index = na// Declaring Box Arraysvar box drawlongBox = navar longBoxes = array.new_box()var box drawShortBox = navar shortBoxes = array.new_box()// Custom Rate of Change (ROC) calculation. This is to calculate high momentum moves in the market.pc = (open - open[4]) / open[4] * 100// If the ROC crossover our Sensitivty input - Then create an Order Block// Sensitivty is negative as this is a Bearish OBif ta.crossunder(pc, -sens)    ob_created := true    cross_index := bar_index    cross_index// If the ROC crossover our Sensitivty input - Then create an Order Blockif ta.crossover(pc, sens)    ob_created_bull := true    cross_index := bar_index    cross_index// -------------------------------// Bearish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created and cross_index - cross_index[1] &gt; 5    float last_green = 0    float highest = 0    // Loop through the most recent candles and find the first GREEN (Bullish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &gt; open[i]            last_green := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawShortBox := box.new(left=bar_index[last_green], top=high[last_green], bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob, border_color=col_bearish, extend=extend.right)    array.push(shortBoxes, drawShortBox)// -------------------------------// Bullish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created_bull and cross_index - cross_index[1] &gt; 5    float last_red = 0    float highest = 0    // Loop through the most recent candles and find the first RED (Bearish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &lt; open[i]            last_red := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawlongBox := box.new(left=bar_index[last_red], top=high[last_red], bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob, border_color=col_bullish, extend=extend.right)    array.push(longBoxes, drawlongBox)// ----------------- Bearish Order Block -------------------// Clean up OB boxes and place alertsif array.size(shortBoxes) &gt; 0    for i = array.size(shortBoxes) - 1 to 0 by 1        sbox = array.get(shortBoxes, i)        top = box.get_top(sbox)        bot = box.get_bottom(sbox)        // If the two last closes are above the high of the bearish OB - Remove the OB        if close[1] &gt; top and close[2] &gt; top            array.remove(shortBoxes, i)            box.delete(sbox)        // Alerts        if high &gt; bot and sell_alert            alert(&#39;Price inside Bearish OB&#39;, alert.freq_once_per_bar)// ----------------- Bullish Clean Up -------------------// Clean up OB boxes and place alertsif array.size(longBoxes) &gt; 0    for i = array.size(longBoxes) - 1 to 0 by 1        sbox = array.get(longBoxes, i)        bot = box.get_bottom(sbox)        top = box.get_top(sbox)        // If the two last closes are below the low of the bullish OB - Remove the OB        if close[1] &lt; bot and close[2] &lt; bot            array.remove(longBoxes, i)// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0///@version=5indicator(title=&#39;Order Blocks&#39;, shorttitle=&#39;سفارش‌ها&#39;, overlay=true, max_boxes_count=20)_v = input.string(&#34;1.0.1&#34;, title=&#34;Version&#34;, options=[&#34;1.0.1&#34;], group=&#34;@amirambit&#34;, tooltip=&#34;@amirambit&#34;)sens = input.int(28, minval=1, title=&#39;حساسیت&#39;, group=&#39;Order Block&#39;, tooltip=&#39;هرچه عدد کمتر باشد، تعداد اردر بلاک های بیشتری روی نمودار نمایش داده می شود&#39;)sens /= 100//OB Colorscol_bullish = input.color(#5db49e, title=&#34;Bullish OB Border&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bullish_ob = input.color(color.new(#64C4AC, 85), title=&#34;Background&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bearish = input.color(#ab0000, title=&#34;Bearish OB Border&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)col_bearish_ob = input.color(color.new(#ab0000, 85), title=&#34;Background&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)// Alertsbuy_alert = input.bool(title=&#39;Buy Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes below the top of a bullish order block.&#39;)sell_alert = input.bool(title=&#39;Sell Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes above the bottom of a bearish order block.&#39;)// Delacring Variablesbool ob_created = falsebool ob_created_bull = falsevar int cross_index = na// Declaring Box Arraysvar box drawlongBox = navar longBoxes = array.new_box()var box drawShortBox = navar shortBoxes = array.new_box()// Custom Rate of Change (ROC) calculation. This is to calculate high momentum moves in the market.pc = (open - open[4]) / open[4] * 100// If the ROC crossover our Sensitivty input - Then create an Order Block// Sensitivty is negative as this is a Bearish OBif ta.crossunder(pc, -sens)    ob_created := true    cross_index := bar_index    cross_index// If the ROC crossover our Sensitivty input - Then create an Order Blockif ta.crossover(pc, sens)    ob_created_bull := true    cross_index := bar_index    cross_index// -------------------------------// Bearish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created and cross_index - cross_index[1] &gt; 5    float last_green = 0    float highest = 0    // Loop through the most recent candles and find the first GREEN (Bullish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &gt; open[i]            last_green := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawShortBox := box.new(left=bar_index[last_green], top=high[last_green], bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob, border_color=col_bearish, extend=extend.right)    array.push(shortBoxes, drawShortBox)// -------------------------------// Bullish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created_bull and cross_index - cross_index[1] &gt; 5    float last_red = 0    float highest = 0    // Loop through the most recent candles and find the first RED (Bearish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &lt; open[i]            last_red := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawlongBox := box.new(left=bar_index[last_red], top=high[last_red], bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob, border_color=col_bullish, extend=extend.right)    array.push(longBoxes, drawlongBox)// ----------------- Bearish Order Block -------------------// Clean up OB boxes and place alertsif array.size(shortBoxes) &gt; 0    for i = array.size(shortBoxes) - 1 to 0 by 1        sbox = array.get(shortBoxes, i)        top = box.get_top(sbox)        bot = box.get_bottom(sbox)        // If the two last closes are above the high of the bearish OB - Remove the OB        if close[1] &gt; top and close[2] &gt; top            array.remove(shortBoxes, i)            box.delete(sbox)        // Alerts        if high &gt; bot and sell_alert            alert(&#39;Price inside Bearish OB&#39;, alert.freq_once_per_bar)// ----------------- Bullish Clean Up -------------------// Clean up OB boxes and place alertsif array.size(longBoxes) &gt; 0    for i = array.size(longBoxes) - 1 to 0 by 1        sbox = array.get(longBoxes, i)        bot = box.get_bottom(sbox)        top = box.get_top(sbox)        // If the two last closes are below the low of the bullish OB - Remove the OB        if close[1] &lt; bot and close[2] &lt; bot            array.remove(longBoxes, i)// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0///@version=5indicator(title=&#39;Order Blocks&#39;, shorttitle=&#39;سفارش‌ها&#39;, overlay=true, max_boxes_count=20)_v = input.string(&#34;1.0.1&#34;, title=&#34;Version&#34;, options=[&#34;1.0.1&#34;], group=&#34;@amirambit&#34;, tooltip=&#34;@amirambit&#34;)sens = input.int(28, minval=1, title=&#39;حساسیت&#39;, group=&#39;Order Block&#39;, tooltip=&#39;هرچه عدد کمتر باشد، تعداد اردر بلاک های بیشتری روی نمودار نمایش داده می شود&#39;)sens /= 100//OB Colorscol_bullish = input.color(#5db49e, title=&#34;Bullish OB Border&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bullish_ob = input.color(color.new(#64C4AC, 85), title=&#34;Background&#34;, inline=&#34;a&#34;, group=&#34;Order Block&#34;)col_bearish = input.color(#ab0000, title=&#34;Bearish OB Border&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)col_bearish_ob = input.color(color.new(#ab0000, 85), title=&#34;Background&#34;, inline=&#34;b&#34;, group=&#34;Order Block&#34;)// Alertsbuy_alert = input.bool(title=&#39;Buy Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes below the top of a bullish order block.&#39;)sell_alert = input.bool(title=&#39;Sell Signal&#39;, defval=true, group=&#39;Alerts&#39;, tooltip=&#39;An alert will be sent when price goes above the bottom of a bearish order block.&#39;)// Delacring Variablesbool ob_created = falsebool ob_created_bull = falsevar int cross_index = na// Declaring Box Arraysvar box drawlongBox = navar longBoxes = array.new_box()var box drawShortBox = navar shortBoxes = array.new_box()// Custom Rate of Change (ROC) calculation. This is to calculate high momentum moves in the market.pc = (open - open[4]) / open[4] * 100// If the ROC crossover our Sensitivty input - Then create an Order Block// Sensitivty is negative as this is a Bearish OBif ta.crossunder(pc, -sens)    ob_created := true    cross_index := bar_index    cross_index// If the ROC crossover our Sensitivty input - Then create an Order Blockif ta.crossover(pc, sens)    ob_created_bull := true    cross_index := bar_index    cross_index// -------------------------------// Bearish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created and cross_index - cross_index[1] &gt; 5    float last_green = 0    float highest = 0    // Loop through the most recent candles and find the first GREEN (Bullish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &gt; open[i]            last_green := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawShortBox := box.new(left=bar_index[last_green], top=high[last_green], bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob, border_color=col_bearish, extend=extend.right)    array.push(shortBoxes, drawShortBox)// -------------------------------// Bullish OB Creation// -------------------------------// Check if we should create a OB, Also check if we haven&#39;t created an OB in the last 5 candles.if ob_created_bull and cross_index - cross_index[1] &gt; 5    float last_red = 0    float highest = 0    // Loop through the most recent candles and find the first RED (Bearish) candle. We will place our OB here.    for i = 4 to 15 by 1        if close[i] &lt; open[i]            last_red := i            break    // Draw our OB on that candle - then push the box into our box arrays.    drawlongBox := box.new(left=bar_index[last_red], top=high[last_red], bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob, border_color=col_bullish, extend=extend.right)    array.push(longBoxes, drawlongBox)// ----------------- Bearish Order Block -------------------// Clean up OB boxes and place alertsif array.size(shortBoxes) &gt; 0    for i = array.size(shortBoxes) - 1 to 0 by 1        sbox = array.get(shortBoxes, i)        top = box.get_top(sbox)        bot = box.get_bottom(sbox)        // If the two last closes are above the high of the bearish OB - Remove the OB        if close[1] &gt; top and close[2] &gt; top            array.remove(shortBoxes, i)            box.delete(sbox)        // Alerts        if high &gt; bot and sell_alert            alert(&#39;Price inside Bearish OB&#39;, alert.freq_once_per_bar)// ----------------- Bullish Clean Up -------------------// Clean up OB boxes and place alertsif array.size(longBoxes) &gt; 0    for i = array.size(longBoxes) - 1 to 0 by 1        sbox = array.get(longBoxes, i)        bot = box.get_bottom(sbox)        top = box.get_top(sbox)        // If the two last closes are below the low of the bullish OB - Remove the OB        if close[1] &lt; bot and close[2] &lt; bot            array.remove(longBoxes, i)            box.delete(sbox)        // Alerts        if low &lt; top and buy_alert            alert(&#39;Price inside Bullish OB&#39;, alert.freq_once_per_bar)            box.delete(sbox)        // Alerts        if low &lt; top and buy_alert            alert(&#39;Price inside Bullish OB&#39;, alert.freq_once_per_bar)            box.delete(sbox)        // Alerts        if low &lt; top and buy_alert            alert(&#39;Price inside Bullish OB&#39;, alert.freq_once_per_bar)</description><category>salar SS</category><author>salar SS</author><pubDate>Sat, 18 Jun 2022 00:29:02 +0430</pubDate></item></channel></rss>