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

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 ScottWalsh, 04-16-2024, 04:29 PM
        6 responses
        27 views
        0 likes
        Last Post ScottWalsh  
        Started by frankthearm, Today, 09:08 AM
        10 responses
        35 views
        0 likes
        Last Post frankthearm  
        Started by GwFutures1988, Today, 02:48 PM
        0 responses
        3 views
        0 likes
        Last Post GwFutures1988  
        Started by mmenigma, Today, 02:22 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by NRITV, Today, 01:15 PM
        2 responses
        9 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Working...
        X