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

Fisher Transform is a 'method' ??

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

    Fisher Transform is a 'method' ??

    Greetings,

    I know I get baffled easily, but this one is very annoying ...

    I am setting up doubles in a MTF strategy, and this is the only error that I cant get resolved:

    if(BarsInProgress == 2)
    { // Save prior bars
    for(int i = 0 ; i < 3 ; i++)

    b2_WRC[i] = b2_WRC[i+1];
    //
    b2_FT[i] = b2_FT[i+1];
    }
    b2_WRC[0] = jhlWilliamsPercentR(BarsArray[2], iWRperiod).PercentR[0];
    //
    b2_FT[0] = FisherTransform(BarsArray[2], iFTperiod).FisherTransform[0];

    the silly on me error is:
    Cannot apply indexing with [] to an expression of type 'method group'
    with it referring to the b2_FT[0] column 15

    The other line isnt causing any error (ie: I comment out the b2_FT[0] line && all compiles cleanly) and structually the two sets of doubles are declared the same style/place in the code. Also removing the [0] from the b2_FT[0] still gives the same error.

    Using b23NT7 and the default FisherTransform ..

    Thanks for the help,
    Jon

    #2
    Hi Trader.Jon,

    There's no need to specify .FisherTransform, as this indicator only has one plot.

    b2_FT[0] = FisherTransform(BarsArray[2], iFTperiod)[0];
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan,

      Thanks for the solution ... I wonder why the FisherTransform was throwing out that error, but the Williams%R that also only has 1 plot and was written up thec same way did not throw out an error?

      Jon

      Comment


        #4
        Williams%R - You specified .PercentR as the plot.

        When you used .FisherTransform, it reads this as the indicator, not a plot belonging to the indicator.

        For syntax help with multi plot indicators, the strategy wizard works well for ths:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Working...
        X