File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/modules/trading-engine/strategy Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ class MovingAverageStrategy extends Strategy {
6363
6464 if ( ! today || ! yesterday ) return ;
6565 const ma20high_yesterday = yesterday . ma20high ;
66- this . logger . info ( "Long Square off check" , { today, ma20high_yesterday } ) ;
6766 if ( ma20high_yesterday > today . low && today . body < 0 ) {
6867 await this . updateStopLoss ( ma20high_yesterday ) ;
6968 }
@@ -73,7 +72,6 @@ class MovingAverageStrategy extends Strategy {
7372 const today = this . stock . now ( ) ;
7473 const yesterday = this . stock . prev ( ) ;
7574
76- this . logger . info ( "Sell Condition Check" , { today, yesterday } ) ;
7775 if ( ! today || ! yesterday ) return ;
7876
7977 if (
@@ -103,7 +101,6 @@ class MovingAverageStrategy extends Strategy {
103101
104102 if ( ! today || ! yesterday ) return ;
105103 const ma20low_yesterday = yesterday . ma20low ;
106- this . logger . info ( "Short Square off check" , { today, ma20low_yesterday } ) ;
107104 if ( today . high > ma20low_yesterday && today . body > 0 ) {
108105 await this . updateStopLoss ( ma20low_yesterday ) ;
109106 }
Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ class Strategy extends BaseStrategy {
115115 this . currentPosition = this . _positionManager . getCurrentPosition ( ) ;
116116 this . currentPosition && ( await this . checkPositionStatus ( ) ) ;
117117
118+ if ( this . currentPosition ) {
119+ this . logger . info ( "Square off condition Check" ) ;
120+ }
118121 if ( this . currentPosition ?. side === "Buy" ) {
119122 await this . longSquareOff ( ) ;
120123 return ;
You can’t perform that action at this time.
0 commit comments