0

i wanna to make box for certin condation , it will be red after breakout (down) that box the box color changes to green and if breakout (up) that box the box color changes to red

EURUSD , FXCM , 4H , start june , 30 , 2021

ex :

//@version=4
study("test", overlay=true)

box_width = input(title="Box Width", type=input.integer, defval=115)

redbar = close < open
greenbar = close > open
candle_length = high - low

if greenbar[1] and close[1] < (low[1] + 0.50 * candle_length[1] ) and redbar and close < open[1] and high > high[1]
    box.new(bar_index, top=high, bottom=low, right=bar_index + box_width, bgcolor=color.new(color.red, 85), border_color=color.red) //, extend=extend.right

i wanna it like the image

enter image description here

Thanks :)

4

0 回答 0