@@ -139,6 +139,7 @@ export class RhTableComponent implements OnInit, OnChanges, OnDestroy {
139139 { field : 'upperResistance' , header : 'Upper Resistance' } ,
140140 { field : 'lowerResistance' , header : 'Lower Resistance' } ,
141141 { field : 'impliedMovement' , header : 'Implied Movement' } ,
142+ { field : 'previousImpliedMovement' , header : 'Previous IM' } ,
142143 { field : 'bearishProbability' , header : 'Probability of Bear Profit' } ,
143144 { field : 'bullishProbability' , header : 'Probability of Bull Profit' } ,
144145
@@ -192,6 +193,7 @@ export class RhTableComponent implements OnInit, OnChanges, OnDestroy {
192193 { field : 'sellSignals' , header : 'Sell' } ,
193194 { field : 'strongsellSignals' , header : 'Strong Sell' } ,
194195 { field : 'impliedMovement' , header : 'Implied Movement' } ,
196+ { field : 'previousImpliedMovement' , header : 'Previous IM' } ,
195197 { field : 'bearishProbability' , header : 'Probability of Bear Profit' } ,
196198 { field : 'bullishProbability' , header : 'Probability of Bull Profit' }
197199 ] ;
@@ -358,7 +360,8 @@ export class RhTableComponent implements OnInit, OnChanges, OnDestroy {
358360 if ( lastSignal . recommendation . hasOwnProperty ( indicator ) ) {
359361 const result = {
360362 algo : String ( indicator ) ,
361- recommendation : 'Neutral'
363+ recommendation : 'Neutral' ,
364+ previousImpliedMovement : null
362365 } ;
363366 if ( lastSignal . recommendation [ indicator ] === 'Bullish' ) {
364367 result . recommendation = 'Buy' ;
@@ -368,6 +371,8 @@ export class RhTableComponent implements OnInit, OnChanges, OnDestroy {
368371 bearishSignals . push ( indicator ) ;
369372 }
370373
374+ result . previousImpliedMovement = this . getPreviousImpliedMove ( indicatorResults . signals [ indicatorResults . signals . length - 2 ] ) ;
375+
371376 const tableObj = {
372377 ...indicatorResults ,
373378 ...result
@@ -377,7 +382,6 @@ export class RhTableComponent implements OnInit, OnChanges, OnDestroy {
377382 }
378383 }
379384
380-
381385 this . getProbability ( bullishSignals , bearishSignals , testResults . signals )
382386 . subscribe ( ( data ) => {
383387 this . findAndUpdateIndicatorScore ( param . ticker , {
@@ -411,6 +415,10 @@ export class RhTableComponent implements OnInit, OnChanges, OnDestroy {
411415 }
412416 }
413417
418+ private getPreviousImpliedMove ( signal ) {
419+ return signal . impliedMovement ;
420+ }
421+
414422 scoreSignals ( stock , signals ) {
415423 this . dailyBacktestService . getSignalScores ( signals )
416424 . subscribe ( ( score ) => {
0 commit comments