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

Help needed with codes...

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

    Help needed with codes...

    HI,
    I just wonder if someone can help me in getting the following lines converted to NT codes. These lines seems to be codes from M4 that I am not able to understand.

    // if (VI_0.VIsq_1.VIsqroot_2==1)VI*=VI;
    // if (VI_0.VIsq_1.VIsqroot_2==2)VI=MathSqrt(VI);
    // if (VI<=zeroVIbelow)VI=0;

    I am in the process of understanding the codes of an indicator that I may try to convert so that it can be used effectively on NT but got stucked in the above 3 lines.

    If someone can provide with equivalent NT codes for the above lines, it will be highly appreciated.

    Thanks in all cases.
    Best regards,
    Yusuf SHAIKH

    #2
    hey Yusuf,

    The variable VI_0.VIsq_1.VIsqroot_2 seems to be a structure variable of some sort.

    could you post the variable section of the code you're looking at?
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    Comment


      #3
      Hi...

      Hi...
      Sure...
      This is what I got under the variable section.

      #region Variables
      // Wizard generated variables
      privateint aDXPeriod = 6;
      privateint mAPeriod = 1;
      // User defined variables (add any user defined variables below)
      private NinjaTrader.Indicator.MAV.MAType mAType = NinjaTrader.Indicator.MAV.MAType.EMA;
      private DataSeries PDI;
      private DataSeries PDM;
      private DataSeries MDM;
      private DataSeries MDI;
      private DataSeries Out;
      privatedouble WeightDM;
      privatedouble WeightDI;
      privatedouble WeightDX;
      privatedouble ChandeEMA;
      privatedouble VImax;
      privatedouble HHV = double.MinValue;
      privatedouble LLV = double.MaxValue;
      #endregion

      Thanks for your reply
      Best regards,
      Yusuf SHAIKH

      Comment


        #4
        Yusuf,

        I mean the variables section of the MT code
        mrlogik
        NinjaTrader Ecosystem Vendor - Purelogik Trading

        Comment


          #5
          Oops...

          Oops,

          I am sorry regarding this as I have NT converted codes from MT4. Though I am able to get the plot of this indicator but not convincingly OK or upto the expectations. The lines I have posted here are from the same converted codes that were in the original codes but not used in calculations and bypassed by // marks as you can see in my post. I will try and search for the original MT4 if I can retrieve, I will post it here. Alaso, in the meantime if something concrete works out in the direction of this indicator development where I feel that it can be used effectively, I will more than please to share it in the file sharing section. Havign said that, until now, I myself am not sure how this indicator can be used as it is showing some abrupt results. Thanks for your interest in all cases. Just give me some more time so that I can search fro the original codes if something fruitful does not develop in the meantime.

          Thanks buddy,
          Best regards,
          Yusuf SHAIKH

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by FrancisMorro, Today, 03:24 AM
          0 responses
          1 view
          0 likes
          Last Post FrancisMorro  
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,769 views
          0 likes
          Last Post Leafcutter  
          Started by Rapine Heihei, 04-23-2024, 07:51 PM
          2 responses
          30 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          943 views
          0 likes
          Last Post spwizard  
          Started by Max238, Today, 01:28 AM
          0 responses
          10 views
          0 likes
          Last Post Max238
          by Max238
           
          Working...
          X