Quintiq file version 2.0
#parent: #root
Method NewStrategy (
  internal[GUIComponent] parent
) as Strategy id:Method_ScenarioManager_DialogCreateEditStrategy_NewStrategy
{
  #keys: '[112884.0.704997324]'
  Body:
  [*
    // New strategy
    Dialog.ShowHideComponents();
    
    // There will 2 transactions for maintenance purpose, because there is quite some logic involved during creation of Strategy in the Editor.
    strategy := Strategy::Create( ScenarioManager,
                                  null( Strategy ),
                                  Strategy::GetUniqueStrategyName( Translations::MP_GlobalParameters_DefaultStrategyName(), ScenarioManager ),
                                  0,
                                  '',
                                  1000.0,
                                  1000.0,
                                  1.0,
                                  1000.0,
                                  1000.0,
                                  DateTime::MinDateTime(),
                                  true );
    
    Dialog.EditStrategy( strategy, parent );
    
    return strategy;
  *]
}
