Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting eld to nt

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

    Converting eld to nt

    Hi im looking for help from ppl who have experience in easy language.

    ive got the following code im attempting to convert to ninjascript:

    Value1 = 2 * WAverage(price, halvedLength);
    Value2 = WAverage(price, length);
    Value3 = WAverage((Value1 - Value2), sqrRootLength);

    The variable price is a NumericSeries. Value1 and Value2 are double.

    What i dont get is that you can do a WAverage from Value1-Value2? Im underthe impression that weighted averages take a defined period of a certain price type. Wha does taking a weighted average of Value1-Value2 mean?

    Having problems understanding this, would appreciate any help
    thanks
    ian

    #2
    Originally posted by iangohye View Post
    Hi im looking for help from ppl who have experience in easy language.

    ive got the following code im attempting to convert to ninjascript:

    Value1 = 2 * WAverage(price, halvedLength);
    Value2 = WAverage(price, length);
    Value3 = WAverage((Value1 - Value2), sqrRootLength);

    The variable price is a NumericSeries. Value1 and Value2 are double.

    What i dont get is that you can do a WAverage from Value1-Value2? Im underthe impression that weighted averages take a defined period of a certain price type. Wha does taking a weighted average of Value1-Value2 mean?

    Having problems understanding this, would appreciate any help
    thanks
    ian
    Hi ian,

    Thanks for your post.

    This just means it smoothes the difference (momentum) of Value1 - Value2 of the specified period input, in this case 'sqrRootLength'.

    The 'Input' does not have to be a Price type one (OHLC), but any type of a series of values, like other indicators for example, or volume.
    Last edited by NinjaTrader_Bertrand; 11-08-2008, 09:59 AM.

    Comment


      #3
      Thanks Bertrand for your reply

      Yup youve confirmed my understanding of averages. (ie. require a set of numbers over a certain period)

      But if the input requires a series of values, how does (Value1 - Value2) fit in there? since (Value1 - Value2) returns a single, double value.

      Comment


        #4
        You have to store Value1 - Value2 calculation for each bar in a DataSeries and then take the average of the DataSeries.

        More information - http://www.ninjatrader-support.com/H...iesObject.html
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        163 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X