• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about stregies tab

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about stregies tab

    hi,
    i'm run 2 strategy(green color)....are 2 signal short..

    and follow to apply another stategy (in yellow) (ProvaLong)

    ProvaLong script :


    protected override void OnBarUpdate()
    {
    EnterLong();
    }

    i ask you 2 question :

    1) why it don't run trade ?

    2) it's possible to have for example..2 strategy long e 1 strategy short on the same futures?

    thanks
    Attached Files

    #2
    Hello esignal,

    Thank you for your post.

    If you long strategy does not have logic to exit and you are waiting until flat before taking live positions then it will not take any new positions.

    What is set for the 'Start behavior' of the long strategy? Is there any exit logic in the long strategy?

    I look forward to your response.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      ok...
      and for the question n. 2

      2) it's possible to have for example..2 strategy long e 1 strategy short on the same futures?

      Comment


        #4
        Hello esignal,

        Thank you for your response.

        It is possible to have the strategies maintaining their own positions on the same future and account. However, the account position will reflect the actual position. For example, you have two strategies short for 1 quantity each and one strategy long for 1 quantity on the same instrument and account, then the account would reflect 1 short.

        For information on account versus strategy position please visit the following link: http://ninjatrader.com/support/helpG..._account_p.htm

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          another problem..

          now i've 2 strategy

          https://gyazo.com/69458d43266396b78c6e060d362b2060

          Here there is the execution

          https://gyazo.com/207d7650e28ac6dddf101d8bb0d5b8c8

          but i don't understand what this execution refer to....
          (is missing name of strategy originally? )

          Comment


            #6
            Hello esignal,

            Thank you for your patience.

            The two Synchronize executions are to sync the account position to the strategy position, the close Position executions close the current position of the strategy, the Sell Short and Buy are entries for their respective sides.

            If you need to determine which execution belongs to which strategy you can use the Signal Names of the order functions to set a string for the orders. Then you could assign a variable to the string as well for the instance of the strategy.

            For example:
            Code:
            		protected override void OnStateChange()
            		{
            			if (State == State.SetDefaults)
            			{
            				Description									= @"Enter the description for your new custom Strategy here.";
            				Name										= "ExampleInstanceEntrySignalNameString";
            				Calculate									= Calculate.OnEachTick;
            				
            				Instance									= 1;
            			}
            		}
            
            		protected override void OnBarUpdate()
            		{
            			if (State == State.Historical) return;
            			
            			EnterLong("entry " + Instance.ToString());
            		}
            		
            		[Range(1, int.MaxValue), NinjaScriptProperty]
            		[Display(ResourceType = typeof(Custom.Resource), Name = "Instance", GroupName = "NinjaScriptParameters", Order = 0)]
            		public int Instance
            		{ get; set; }
            Please let me know if you have any questions.
            Patrick H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rickyblah12, Today, 01:01 PM
            0 responses
            6 views
            0 likes
            Last Post rickyblah12  
            Started by dadarara, Today, 12:18 PM
            0 responses
            7 views
            0 likes
            Last Post dadarara  
            Started by joemiller, Today, 07:33 AM
            0 responses
            8 views
            0 likes
            Last Post joemiller  
            Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
            7 responses
            37 views
            0 likes
            Last Post DaveS
            by DaveS
             
            Started by claxxical, Yesterday, 10:00 PM
            0 responses
            11 views
            0 likes
            Last Post claxxical  
            Working...
            X