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 rhyminkevin, Today, 04:58 PM
      3 responses
      47 views
      0 likes
      Last Post Anfedport  
      Started by iceman2018, Today, 05:07 PM
      0 responses
      5 views
      0 likes
      Last Post iceman2018  
      Started by lightsun47, Today, 03:51 PM
      0 responses
      7 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      14 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      50 views
      0 likes
      Last Post futtrader  
      Working...
      X