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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        476 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        317 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        254 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        340 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        305 views
        0 likes
        Last Post CarlTrading  
        Working...
        X