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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        181 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        334 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        258 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        358 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        187 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X