Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

3rd Party Indicator integration

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

    3rd Party Indicator integration

    Hi,

    I'm not sure if you can help since my query involves a 3rd party indicator but I thought you might be able to give some direction.

    When using strategy builder, I've added a simple condition with a 3rd party indicator just to test. When I do "View Code", I see that the indicator is integrated as


    Code:
    public class SBtest01 : Strategy
    {
    private NinjaTrader.NinjaScript.Indicators.Sim22.Sim22_DeltaV3 Sim22_DeltaV31;
    
    protected override void OnStateChange()
    {...}
    Code:
    else if (State == State.DataLoaded)
    {				
    Sim22_DeltaV31= Sim22_DeltaV3(Close, DeltaV3BarWidthTypeEnum.Auto, NinjaTrader.NinjaScript.AddOns.Sim22_DeltaUtilities+DeltaCalculationTypeEnum.BidAsk, NinjaTrader.NinjaScript.AddOns.Sim22_DeltaUtilities+DeltaCotType.None, true, false, false, GaplessEmaTypeEnum.Normal, 20, NinjaTrader.NinjaScript.AddOns.Sim22_DeltaUtilities+DeltaTradeSizeFilterTypeEnum.None, 1, NinjaTrader.NinjaScript.AddOns.Sim22_HaUtilities+HeikenAshiCalculationType.None, false, true, true);
    }
    and the condition I set is;

    Code:
    if (Sim22_DeltaV31.DeltaClose[0] < Sim22_DeltaV31.DeltaClose[1])
    {
    EnterShort(Convert.ToInt32(DefaultQuantity), "");
    }
    When I compile, I get 8 lines of error messages for the State.DataLoaded section

    These are the error messages;

    Error
    'NinjaTrader.NinjaScript.AddOns.Sim22_DeltaUtiliti es' is a 'type', which is not valid in the given context
    The name 'DeltaCalculationTypeEnum' does not exist in the current context
    'NinjaTrader.NinjaScript.AddOns.Sim22_DeltaUtiliti es' is a 'type', which is not valid in the given context
    The name 'DeltaCotType' does not exist in the current context
    'NinjaTrader.NinjaScript.AddOns.Sim22_DeltaUtiliti es' is a 'type', which is not valid in the given context
    The name 'DeltaTradeSizeFilterTypeEnum' does not exist in the current context
    'NinjaTrader.NinjaScript.AddOns.Sim22_HaUtilities' is a 'type', which is not valid in the given context
    The name 'HeikenAshiCalculationType' does not exist in the current context
    I have noticed that there are plus signs (+) in the code where the error messages are referring to, which seemed unusual. I replaced them dots, it compiled but strategy did not enter any orders.

    I would really appreciate if you could give some guidance to fix this.

    Thanks
    MT

    #2
    Hello mntemel,

    Thank you for your post.

    Can you view the code for the Sim22_DeltaV31 when you are in the NinjaScript Editor? Or is this file protected in an assembly?

    I look forward to your response.

    Comment


      #3
      Hi Patrick,

      I can see the code, it's not protected.

      Thanks
      MT

      Comment


        #4
        Hello mntemel,

        Thank you for your response.

        The periods or dots are the correct means to use these and not the '+' symbol. If the strategy is not taking orders then it would be recommended to place Print() function calls where your conditions return true to determine if the conditions are the reason the orders did not submit.

        Please let me know if you have any questions.

        Comment


          #5
          Hi Patrick,

          Thank your for your reply. I'll use the print method to understand what's going on with the condition.

          On the other hand what I don't understand is; why strategy builder is adding the indicator into the strategy with these "+" symbols which is causing a compile error, any thoughts?

          Thanks
          MT

          Comment


            #6
            Hello mntemel,

            Thank you for your response.

            Is this an indicator you can send to me for testing?

            You can send the indicator to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email.

            You can export your indicator by going to Tools > Export > NinjaScript Add On > Add > select your indicator > OK > Export > name the file 'NTsupport' > Save.
            The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript.

            Comment


              #7
              Hello MT,

              Thank you for your patience.

              A fix for this issue is expected in the next release of NinjaTrader 8. I cannot guarantee implementation at this time and I do not have a release date.

              Please let me know if you have any questions.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Christopher_R, Today, 12:29 AM
              0 responses
              6 views
              0 likes
              Last Post Christopher_R  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              166 responses
              2,235 views
              0 likes
              Last Post sidlercom80  
              Started by thread, Yesterday, 11:58 PM
              0 responses
              3 views
              0 likes
              Last Post thread
              by thread
               
              Started by jclose, Yesterday, 09:37 PM
              0 responses
              7 views
              0 likes
              Last Post jclose
              by jclose
               
              Started by WeyldFalcon, 08-07-2020, 06:13 AM
              10 responses
              1,415 views
              0 likes
              Last Post Traderontheroad  
              Working...
              X