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

Using 3rd part indicator and drawing intrabar values

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

    Using 3rd part indicator and drawing intrabar values

    I am using 3rd party tool (GZT), and I am trying to develop my own Indicator, based on their Indicators. I managed to write my indicator to preform well, but the last bar is shown only after the bar close and intrabar, with CalculateOnBarClose=false.

    I have added the dll to my indicator Reference. I found that since I don't have the .cs file of the 3rd party indicator, if I call the 3rd party directly, like:
    Code:
    double iValue = GZTVelocityMomo(10,26,10,1).MomoHigh[0]; 
    or 
    double iValue = GZTVelocityMomo(BarsArray[1],10,26,10,1).MomoHigh[0];
    I get an error:
    Code:
    Indicator\IBEntrySignal.cs,'NinjaTrader.Indicator.GZTVelocityMomo' is a 'type' but is used like a 'variable',CS0118
    On the other hand, if I using an indirect approach, and call the indicator in 2 steps, such as:
    Code:
    GZTVelocityMomo GZTVM = new NinjaTrader.Indicator.GZTVelocityMomo();
    GZTVM.GZTVelocityMomo(10,26,10,1).MomoHigh[0];
    everything works fine, except the last bar, which is not drawn until it closes.

    I attache a simple test I have done. Since the original indicators I am using are under license, I changed the code to use CCI instead. With the indicator, you can change the InDirectCall value: true is inDirect, false is Direct.

    Any help is welcomed.
    Attached Files
    Last edited by Shai Samuel; 09-10-2015, 05:04 PM.

    #2
    Hello Shai Samuel,

    Thank you for your post and patience.

    Can you provide the full code file (strategy or indicator) used to call the GZTVelocityMomo that generates that error? As I would not expect GZTVelocityMomo(10,26,10,1).MomoHigh[0] or GZTVelocityMomo(BarsArray[1],10,26,10,1).MomoHigh[0] to generate that error when being assigned to a double.

    Comment


      #3
      Thank you Patrick for you support. I just sent the code to your support email.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PhillT, Today, 02:16 PM
      2 responses
      3 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by Kaledus, Today, 01:29 PM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      14 responses
      47 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by gentlebenthebear, Today, 01:30 AM
      2 responses
      14 views
      0 likes
      Last Post gentlebenthebear  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      17 views
      0 likes
      Last Post PaulMohn  
      Working...
      X