@@ -574,18 +574,20 @@ assert.deepEqual(JSON.parse(normalizedDcaInputs.extra_variables_json), {
574574 dca_base_investment_usd : "500" ,
575575 cash_only_execution_mode : "enabled" ,
576576} ) ;
577- assert . throws (
578- ( ) => __test . normalizeSwitchInputs ( {
579- platform : "ibkr" ,
580- target_name : "ibkr-primary" ,
581- strategy_profile : "nasdaq_sp500_smart_dca" ,
582- execution_mode : "live" ,
583- plugin_mode : "auto" ,
584- dca_mode : "smart" ,
585- dca_base_investment_usd : "500" ,
586- } ) ,
587- / D C A s t r a t e g y p r o f i l e s a r e n o t s u p p o r t e d o n i b k r / ,
588- ) ;
577+ const normalizedIbkrDcaInputs = __test . normalizeSwitchInputs ( {
578+ platform : "ibkr" ,
579+ target_name : "ibkr-primary" ,
580+ strategy_profile : "nasdaq_sp500_smart_dca" ,
581+ execution_mode : "live" ,
582+ plugin_mode : "auto" ,
583+ dca_mode : "smart" ,
584+ dca_base_investment_usd : "500" ,
585+ } ) ;
586+ assert . deepEqual ( JSON . parse ( normalizedIbkrDcaInputs . extra_variables_json ) , {
587+ dca_mode : "smart" ,
588+ dca_base_investment_usd : "500" ,
589+ cash_only_execution_mode : "enabled" ,
590+ } ) ;
589591const normalizedDcaJsonInputs = __test . normalizeSwitchInputs ( {
590592 platform : "firstrade" ,
591593 target_name : "default" ,
@@ -614,25 +616,26 @@ assert.deepEqual(JSON.parse(normalizedIbitZscoreInputs.extra_variables_json), {
614616 ibit_zscore_exit_mode : "live" ,
615617 cash_only_execution_mode : "enabled" ,
616618} ) ;
617- assert . throws (
618- ( ) => __test . normalizeSwitchInputs ( {
619- platform : "ibkr" ,
620- target_name : "ibit-primary" ,
621- strategy_profile : "ibit_smart_dca" ,
622- execution_mode : "live" ,
623- plugin_mode : "auto" ,
624- ibit_zscore_exit_mode : "live" ,
625- } ) ,
626- / D C A s t r a t e g y p r o f i l e s a r e n o t s u p p o r t e d o n i b k r / ,
627- ) ;
619+ const normalizedIbkrIbitZscoreInputs = __test . normalizeSwitchInputs ( {
620+ platform : "ibkr" ,
621+ target_name : "ibit-primary" ,
622+ strategy_profile : "ibit_smart_dca" ,
623+ execution_mode : "live" ,
624+ plugin_mode : "auto" ,
625+ ibit_zscore_exit_mode : "live" ,
626+ } ) ;
627+ assert . deepEqual ( JSON . parse ( normalizedIbkrIbitZscoreInputs . extra_variables_json ) , {
628+ ibit_zscore_exit_mode : "live" ,
629+ cash_only_execution_mode : "enabled" ,
630+ } ) ;
628631assert . throws (
629632 ( ) => __test . normalizeSwitchInputs ( {
630633 platform : "ibkr" ,
631634 target_name : "ibkr-primary" ,
632635 strategy_profile : "nasdaq_sp500_smart_dca" ,
633636 ibit_zscore_exit_mode : "live" ,
634637 } ) ,
635- / D C A s t r a t e g y p r o f i l e s a r e n o t s u p p o r t e d o n i b k r / ,
638+ / I B I T Z - S c o r e e x i t s e t t i n g s / ,
636639) ;
637640assert . throws (
638641 ( ) => __test . normalizeSwitchInputs ( {
0 commit comments