# NEOTICKER DATA BEGIN ScriptType=Indicator Description=Basic Consensus System Name=sys_basic_consensus Language=Formula Links=1 MinBars=0 TimerInterval=100 MetaStyle=Normal ValueRange=Same as Source Placement=Smart Multiplot_num_plots=1 Multiplot_color_0=255 Multiplot_style_0=Line Multiplot_width_0=1 Multiplot_enabled_0=1 Multiplot_breakstyle_0=0 UpdateByTick=0 TradingSystemUI=1 PrimaryLinkOnly=0 NotifyOnRemoval=0 Param_count=9 Param_name_0=Score Type Param_inuse_0=1 Param_type_0=string Param_default_0=Weighted Param_name_1=Score Period Param_inuse_1=1 Param_type_1=integer.gt.0 Param_default_1=5 Param_name_2=MA Type Param_inuse_2=1 Param_type_2=string Param_default_2=Weighted Param_name_3=MA Fast Param_inuse_3=1 Param_type_3=integer.gt.0 Param_default_3=20 Param_name_4=MA Slow Param_inuse_4=1 Param_type_4=integer.gt.0 Param_default_4=50 Param_name_5=SlowK Period Param_inuse_5=1 Param_type_5=integer.gt.0 Param_default_5=9 Param_name_6=SlowK Smooth Param_inuse_6=1 Param_type_6=integer.gt.0 Param_default_6=3 Param_name_7=Uptrend Bars Param_inuse_7=1 Param_type_7=integer.gt.0 Param_default_7=6 Param_name_8=Downtrend Bars Param_inuse_8=1 Param_type_8=integer.gt.0 Param_default_8=6 Explanation_Lines=0 # NEOTICKER DATA END ' create all the required indicators here makeindicator (ma_fast, mov, data1, param3, param4); makeindicator (ma_slow, mov, data1, param3, param5); makeindicator (price_slowk, slowk, data1, param6, param7); ' generate the bullish/bearish score for the moving averages $ma_score := choose ( data1 > ma_fast and ma_fast > ma_slow, 2, data1 > ma_fast and data1 > ma_slow, 1, data1 < ma_fast and ma_fast < ma_slow, -2, data1 < ma_fast and data1 < ma_slow, -1, 0); ' generate the bullish/bearish score for the oscillator $osc_score := choose ( price_slowk >= 75, 2, price_slowk >= 55, 1, price_slowk > 45, 0, price_slowk > 25, -1, -2); ' generate the bullish/bearish score for the price pattern $trend_score := choose (low > low (param8), 2, close > close (param8), 1, high < high (param9), -2, close < close (param9), -1, 0); ' calculate the combined score, then create the buy/sell signal combined_score := $ma_score + $osc_score + $trend_score; score_ma := mov (combined_score, param1, param2); ' not taking signal at the end of day $can_trade := date >= int (futuredatetime (2)); longatmarket ( $can_trade > 0 and xaboveconst (score_ma, 0) > 0, defaultordersize); shortatmarket ( $can_trade > 0 and xbelowconst (score_ma, 0) > 0, defaultordersize); plot1 := currentequity;