ignited bar

samhanoh

New member
VIP
I need help to write for me scrip of ignited bar as follow:

checks if the absolute size of the current bar (|close - open|) is 2 time greater than the average size of the previous 50 bars. And volume of the current bar is at least 3 times the average volume of the previous 50 bars.

When ignited bar is bullish make bar color showing on chart in blue color see photo watch

When ignited bar is Berish make bar color showing on chart in dark fuchsia color see photo attach

Also make edit availed to change the condition separate for volume and bar

bullish when close >open
bearish when close <open
 

Attachments

  • ScreenHunter 581.jpg
    ScreenHunter 581.jpg
    29.2 KB · Views: 73
Solution
I need help to write for me scrip of ignited bar as follow:

checks if the absolute size of the current bar (|close - open|) is 2 time greater than the average size of the previous 50 bars. And volume of the current bar is at least 3 times the average volume of the previous 50 bars.

When ignited bar is bullish make bar color showing on chart in blue color see photo watch

When ignited bar is Berish make bar color showing on chart in dark fuchsia color see photo attach

Also make edit availed to change the condition separate for volume and bar

here is an upper study
can choose to use price and volume, just price, or just volume, to define ignite bar

Code:
#ignite_bar_vol...
I need help to write for me scrip of ignited bar as follow:

checks if the absolute size of the current bar (|close - open|) is 2 time greater than the average size of the previous 50 bars. And volume of the current bar is at least 3 times the average volume of the previous 50 bars.

When ignited bar is bullish make bar color showing on chart in blue color see photo watch

When ignited bar is Berish make bar color showing on chart in dark fuchsia color see photo attach

Also make edit availed to change the condition separate for volume and bar

here is an upper study
can choose to use price and volume, just price, or just volume, to define ignite bar

Code:
#ignite_bar_vol

#https://usethinkscript.com/threads/ignited-bar.20423/#post-150143
#ignited bar
# ignited bar as follow:

# checks if the absolute size of the current bar (|close - open|)
#  is 2 time greater than
#  the average size of the previous 50 bars.

# And volume of the current bar
#  is at least 3 times
#  the average volume of the previous 50 bars.

# ignited bar is bullish , bar color is blue (cyan)
# ignited bar is Bearish , bar color is dark fuchsia (magenta)

#Also make edit availed to change the condition separate for volume and bar

#bullish when  close > open
#bearish when  close < open

def na = double.nan;
def bn = barnumber();
def bullish = close > open;
def bearish = close < open;
def ht = absvalue(open - close);
input ignite_type = { default price_and_volume , price , volume };

# checks if the absolute size of the current bar (|close - open|)
#  is 2 time greater than
#  the average size of the previous 50 bars.
input ignite_factor = 2.0;
input bar_ht_avg_length = 50;
def bar_ht_avg = average(ht, bar_ht_avg_length);
def isignite_bar = (ht >= (ignite_factor * bar_ht_avg));

# And volume of the current bar
#  is at least 3 times
#  the average volume of the previous 50 bars.
def v = volume;
input vol_factor = 3.0;
input vol_avg_length = 50;
def vol_avg = average(v, vol_avg_length);
def isignite_vol = (v >= (vol_factor * vol_avg));

def bullbar;
def bearbar;
switch(ignite_type) {
case price_and_volume:
 bullbar = bullish and isignite_bar and isignite_vol;
 bearbar = bearish and isignite_bar and isignite_vol;
case price:
 bullbar = bullish and isignite_bar;
 bearbar = bearish and isignite_bar;
case volume:
 bullbar = bullish and isignite_vol;
 bearbar = bearish and isignite_vol;
}

input change_bar_color = yes;
AssignPriceColor(
 if !change_bar_color then color.current
 else if bullbar then color.cyan
 else if bearbar then color.magenta
 else color.current);

input show_arrows = yes;
plot zup = if bullbar then low*0.995 else na;
zup.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
zup.SetDefaultColor(Color.green);
zup.setlineweight(3);
zup.hidebubble();

plot zdwn = if bearbar then high*1.005 else na;
zdwn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
zdwn.SetDefaultColor(Color.red);
zdwn.setlineweight(3);
zdwn.hidebubble();
#


----------------------

this is a study for volume chart.
it shows an average line and the average x a factor number.
to easily see which bars are big.

Code:
#ignite_bar_vol_vol
#https://usethinkscript.com/threads/ignited-bar.20423/#post-150143
#ignited bar
# ignited bar as follow:

# And volume of the current bar
#  is at least 3 times
#  the average volume of the previous 50 bars.

def na = double.nan;
def bn = barnumber();

# And volume of the current bar
#  is at least 3 times
#  the average volume of the previous 50 bars.
def v = volume;
input vol_factor = 3.0;
input vol_avg_length = 50;
def vol_avg = average(v, vol_avg_length);
def isignite_vol = (v >= (vol_factor * vol_avg));

plot z1 = vol_avg;
z1.SetDefaultColor(Color.cyan);
#z1.setlineweight(1);
z1.hidebubble();

plot z2 = (vol_factor * vol_avg);
z2.SetDefaultColor(Color.gray);
z2.hidebubble();
 

Attachments

  • img1.JPG
    img1.JPG
    87.6 KB · Views: 55
Solution
thank you very much it work exactly as i ask ,can you make scrip to scan ignited bar ? no need color just scan for the ignited bar

it is not doing the scan
 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
364 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top