@@ -666,7 +666,7 @@ def addSma(self):
666
666
paramDialog .addParameterColor ("Plot color" , "#FFFF00" )
667
667
paramDialog .adjustSize ()
668
668
669
- if (paramDialog .exec () == QtWidgets .QDialog .Accepted ):
669
+ if (paramDialog .exec () == QtWidgets .QDialog .DialogCode . Accepted ):
670
670
period = paramDialog .getValue ("SMA Period" )
671
671
width = paramDialog .getValue ("Plot width" )
672
672
qColor = paramDialog .getColorValue ("Plot color" )
@@ -688,7 +688,7 @@ def addEma(self):
688
688
paramDialog .addParameterColor ("Plot color" , "#FFFF00" )
689
689
paramDialog .adjustSize ()
690
690
691
- if ( paramDialog .exec () == QtWidgets .QDialog .Accepted ) :
691
+ if paramDialog .exec () == QtWidgets .QDialog .DialogCode . Accepted :
692
692
period = paramDialog .getValue ("EMA Period" )
693
693
width = paramDialog .getValue ("Plot width" )
694
694
qColor = paramDialog .getColorValue ("Plot color" )
@@ -702,13 +702,13 @@ def toogleRsi(self):
702
702
if self .RsiPB .isChecked ():
703
703
# Show indicator parameter dialog
704
704
paramDialog = indicatorParametersUI .IndicatorParametersUI ()
705
- paramDialog .setWindowFlags (QtCore .Qt .CustomizeWindowHint )
705
+ paramDialog .setWindowFlags (QtCore .Qt .WindowType . CustomizeWindowHint )
706
706
paramDialog .setTitle ("RSI Indicator parameters" )
707
707
paramDialog .addParameter ("RSI Period" , 14 )
708
708
paramDialog .addParameterColor ("Plot color" , "#FFFF00" )
709
709
paramDialog .adjustSize ()
710
710
711
- if ( paramDialog .exec () == QtWidgets .QDialog .Accepted ) :
711
+ if paramDialog .exec () == QtWidgets .QDialog .DialogCode . Accepted :
712
712
period = paramDialog .getValue ("RSI Period" )
713
713
qColor = paramDialog .getColorValue ("Plot color" )
714
714
self .fpltWindow [self .current_timeframe ].drawRsi ( period , qColor )
@@ -728,14 +728,14 @@ def toogleStochastic(self):
728
728
if self .StochasticPB .isChecked ():
729
729
# Show indicator parameter dialog
730
730
paramDialog = indicatorParametersUI .IndicatorParametersUI ()
731
- paramDialog .setWindowFlags (QtCore .Qt .CustomizeWindowHint )
731
+ paramDialog .setWindowFlags (QtCore .Qt .WindowType . CustomizeWindowHint )
732
732
paramDialog .setTitle ("Stochastic Indicator parameters" )
733
733
paramDialog .addParameter ("Stochastic Period K" , 14 )
734
734
paramDialog .addParameter ("Stochastic Smooth K" , 3 )
735
735
paramDialog .addParameter ("Stochastic Smooth D" , 3 )
736
736
paramDialog .adjustSize ()
737
737
738
- if ( paramDialog .exec () == QtWidgets .QDialog .Accepted ) :
738
+ if paramDialog .exec () == QtWidgets .QDialog .DialogCode . Accepted :
739
739
period = paramDialog .getValue ("Stochastic Period K" )
740
740
smooth_k = paramDialog .getValue ("Stochastic Smooth K" )
741
741
smooth_d = paramDialog .getValue ("Stochastic Smooth D" )
@@ -757,14 +757,14 @@ def toogleStochasticRsi(self):
757
757
if self .StochasticRsiPB .isChecked ():
758
758
# Show indicator parameter dialog
759
759
paramDialog = indicatorParametersUI .IndicatorParametersUI ()
760
- paramDialog .setWindowFlags (QtCore .Qt .CustomizeWindowHint )
760
+ paramDialog .setWindowFlags (QtCore .Qt .WindowType . CustomizeWindowHint )
761
761
paramDialog .setTitle ("Stochastic Indicator parameters" )
762
762
paramDialog .addParameter ("Stochastic Rsi Period K" , 14 )
763
763
paramDialog .addParameter ("Stochastic Rsi Smooth K" , 3 )
764
764
paramDialog .addParameter ("Stochastic Rsi Smooth D" , 3 )
765
765
paramDialog .adjustSize ()
766
766
767
- if (paramDialog .exec () == QtWidgets .QDialog .Accepted ):
767
+ if (paramDialog .exec () == QtWidgets .QDialog .DialogCode . Accepted ):
768
768
period = paramDialog .getValue ("Stochastic Rsi Period K" )
769
769
smooth_k = paramDialog .getValue ("Stochastic Rsi Smooth K" )
770
770
smooth_d = paramDialog .getValue ("Stochastic Rsi Smooth D" )
@@ -814,13 +814,13 @@ def createTransactionsUI(self, trades):
814
814
row += 1
815
815
816
816
self .transactionTableWidget .horizontalHeader ().setStretchLastSection (True )
817
- self .transactionTableWidget .horizontalHeader ().setSectionResizeMode (QtWidgets .QHeaderView .Stretch )
817
+ self .transactionTableWidget .horizontalHeader ().setSectionResizeMode (QtWidgets .QHeaderView .ResizeMode . Stretch )
818
818
819
819
self .transactionTableWidget .setStyleSheet ("alternate-background-color: #AAAAAA;background-color: #CCCCCC;" )
820
820
self .transactionTableWidget .setAlternatingRowColors (True )
821
821
self .transactionTableWidget .setSortingEnabled (True )
822
- self .transactionTableWidget .setSelectionBehavior (QtWidgets .QAbstractItemView .SelectRows )
823
- self .transactionTableWidget .setEditTriggers (QtWidgets .QAbstractItemView .NoEditTriggers )
822
+ self .transactionTableWidget .setSelectionBehavior (QtWidgets .QAbstractItemView .SelectionBehavior . SelectRows )
823
+ self .transactionTableWidget .setEditTriggers (QtWidgets .QAbstractItemView .EditTrigger . NoEditTriggers )
824
824
825
825
self .dock_transactions .addWidget (self .transactionTableWidget )
826
826
0 commit comments