Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

formula conversion

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

    formula conversion

    Hi;

    Can anybody help please,

    I am, unfortunately, having to trade with the T4 platform for the next 2 weeks and am trying to write a code in xml.

    I have the bulk of it but I am trying to convert the VMA indicator and dont understand the code text for the smoothing constant:

    double sc = 2.0 / (double)(period + 1);

    in xml I have got sc = 2.0/ ?what?(period + 1);

    obviously I dont know what the ?what? should be.

    Can anybody help please to explain what the 'double' is. I have looked it up in the C# ref guide on line but still don't understand - something to do with converting it to 1 decimal place or something I think.
    Any help gratefully appreciated.

    Ben

    #2
    stocktraderbmp,

    (double) is attempting to cast the equation (period+1) as a double, so that it can be used in calculations with other double, in this case 2.0 . You can think of it as converting one data type to another.



    Hopefully someone can help you with the XML portion, as this is unsupported by NT support.

    Please let me know if I may be of further assistance.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Adam that answers the question the XML bit I can work out from that thanks again

      Comment


        #4
        stocktrader,

        We are always happy to assist. Have a nice weekend!
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        344 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        557 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X