0% found this document useful (0 votes)
1K views1 page

1111 - C

Uploaded by

ammsna10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views1 page

1111 - C

Uploaded by

ammsna10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=5

indicator('GainzAlgo Pro4', overlay=true, max_labels_count=500)


candle_stability_index_param = input.float(0.5, 'Candle Stability Index', 0,
1,step=0.1, group='Technical', tooltip='Candle Stability Index measures the
ratiobetween the body and the wicks of a candle. Higher - more stable.')
rsi_index_param = input.int(50, 'RSI Index', 0, 100, group='Technical',tooltip='RSI
Index measures how overbought/oversold is the market. Higher -
moreoverbought/oversold.')
candle_delta_length_param = input.int(5, 'Candle Delta Length',
3,group='Technical', tooltip='Candle Delta Length measures the period over how
manycandles the price increased/decreased. Higher - longer period.')
disable_repeating_signals_param = input.bool(false, 'Disable Repeating
Signals',group='Technical', tooltip='Removes repeating signals. Useful for removing
clustersof signals and general clarity')
GREEN = color.rgb(29, 255, 40)
RED = color.rgb(255, 0, 0)
TRANSPARENT = color.rgb(0, 0, 0, 100)
label_size = input.string('normal', 'Label Size', options=['huge',
'large','normal', 'small', 'tiny'], group='Cosmetic')
label_style = input.string('text bubble', 'Label Style', ['text bubble','triangle',
'arrow'], group='Cosmetic')
buy_label_color = input(GREEN, 'BUY Label Color',
inline='Highlight',group='Cosmetic')
sell_label_color = input(RED, 'SELL Label Color',
inline='Highlight',group='Cosmetic')
label_text_color = input(color.white, 'Label Text Color',
inline='Highlight',group='Cosmetic')
stable_candle = math.abs(close - open) / ta.tr > candle_stability_index_paramrsi
bullish_engulfing = close[1] < open[1] and close > open and close > open[1]
rsi_below = rsi < rsi_index_paramdecrease_over close <
close[candle_delta_length_param]bull = bullish_engulfing and stable_candle and
rsi_below and decrease_over andbarstate.isconfirmedbearish_engulfing = close[1] >
open[1] and close < open and close < open[1]rsi_above = rsi > 100 -
rsi_index_paramincrease_over = close > close[candle_delta_length_param]bear =
bearish_engulfing and stable_candle and rsi_above and increase_over
andbarstate.isconfirmedvar last_signal = ''if bull and
(disable_repeating_signals_param ? (last_signal != 'buy' ? true : na) :true) if
label_style == 'text bubble' label.new(bull ? bar_index : na, low, 'BUY',
color=buy_label_color,style=label.style_label_up, textcolor=label_text_color,
size=label_size) else if label_style == 'triangle'
label.new(bull ? bar_index : na, low, 'BUY',
yloc=yloc.belowbar,color=buy_label_color, style=label.style_triangleup,
textcolor=TRANSPARENT,size=label_size) else if label_style == 'arrow'
label.new(bull ? bar_index : na, low, 'BUY',
yloc=yloc.belowbar,color=buy_label_color, style=label.style_arrowup,
textcolor=TRANSPARENT,size=label_size) last_signal := 'buy'if bear and
(disable_repeating_signals_param ? (last_signal != 'sell' ? true :na) : true) if
label_style == 'text bubble' label.new(bear ? bar_index : na, high, 'SELL',
color=sell_label_color,style=label.style_label_down, textcolor=label_text_color,
size=label_size) else if label_style == 'triangle' label.new(bear ? bar_index : na,
high, 'SELL', yloc=yloc.abovebar,color=sell_label_color,
style=label.style_triangledown, textcolor=TRANSPARENT,size=label_size) else if
label_style == 'arrow' label.new(bear ? bar_index : na, high, 'SELL',
yloc=yloc.abovebar,color=sell_label_color, style=label.style_arrowdown,
textcolor=TRANSPARENT,size=label_size) last_signal := 'sell'alertcondition(bull,
'BUY Signals', 'New signal: BUY')alertcondition(bear, 'SELL Signals', 'New signal:
SELL')

You might also like