Bill the program for BUY/SELL signal
#index '&SPX' #MAX_QUOTES 150 #OUTPUT_FILE 'RSISTO.LST N' if first_ticker then begin writeln(' Analysis of end of Day Closing prices and recommendations'); writeln ('in Rubins Tulips Market - '); writeln (' '); writeln ('This is the most effective list, but validate signals. Results'); writeln ('are relative to the SPX and move relative to the SPX - Haim'); writeln (' '); writeln('Today is ' ,date,); writeln (' '); writeln('S&P Closed ',index,); writeln('S&P Change ' ,(index-index[-1]),); writeln(' '); writeln('Recomandation Price Stoch. RSI RSI Change'); writeln(' '); end; RS : ARRAY; { Relative Strength Array} OFS : ARRAY; { Initial Offset array} rsroc: array; rsi_array : array; rsi13: array; stoch_array : array; stoch_array = stoch(14,3); rsich: array; RS=mulby(div(C,index),100); set(OFS,RS[1]); RS=SUB(RS,OFS); rsroc=ROC(RS,5,'%'); rsi_array=RSI(14); rsi13=MOV(rsi_array,13,'E'); rsidif: array; rsidif=SUB(rsi_array,rsi13); d3_array : array; d3_array = mov(stoch_array,3,'E'); ma_array = mov(c,21,'E'); rsich = rsi_array[0]-rsi_array[-1] if d3_array[-1] <= 25 AND stoch_array[-1] < d3_array[-1] AND stoch_array > d3_array AND C < ma_array AND rsroc>(-1) AND rsidif> (-10) THEN WRITELN(' BUY SIGNAL ON ',TICKER , C,' ',stoch_array,' ',rsi_array, ' ',rsich,); if d3_array[-1] >= 77 AND stoch_array[-1] > d3_array[-1] AND stoch_array < d3_array AND C > ma_array AND rsroc< 1 AND rsidif< 10 THEN WRITELN('SELL SIGNAL ON ',TICKER , C,' ',stoch_array,' ',rsi_array, ' ',rsich,); end; |