Announcement

Collapse
No announcement yet.

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 condorhero, Today, 09:28 PM
          0 responses
          5 views
          0 likes
          Last Post condorhero  
          Started by MaraAnkh, Today, 08:44 PM
          0 responses
          6 views
          0 likes
          Last Post MaraAnkh  
          Started by wooofad, Today, 05:38 PM
          0 responses
          7 views
          0 likes
          Last Post wooofad
          by wooofad
           
          Started by caacapital, Today, 10:10 AM
          2 responses
          18 views
          0 likes
          Last Post caacapital  
          Started by DiverG20, Today, 10:23 AM
          0 responses
          23 views
          0 likes
          Last Post DiverG20  
          Working...
          X