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

Indicator is a "type" but is used like a variable

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

    Indicator is a "type" but is used like a variable

    I have and indicator that works perfectly for my needs. The problem is that I can't use the indicator in a strategy. The way it's written the colors don't exist in the current context, and the color type is used like a variable. Can some one please fix this bug in the GoldFinger indicator so it works in a strategy???

    Here are the strategy errors using the GoldFinger indicator:


    Click image for larger version

Name:	Errors in GoldFinger strategy.GIF
Views:	1
Size:	44.7 KB
ID:	902120


    Here is the relevant strategy logic below that uses the problem indicator refured to as "GoldFinger" in the strategy.


    // Condition set 1
    if GoldFinger(Color [Red], 0, 0, Color [LightBlue]).Upper[0] <= High[0])
    {

    }
    // Condition set 2
    if GoldFinger(Color [Red], 0, 0, Color [LightBlue]).Lower[0] >= High[0])
    {


    I've attached the problem indicator code called "GoldFinger" as a cs file.

    GoldFinger.cs


    Whatever you can do to help me resolve this is very much appreciated!!!


    THANKS!!!


    DEW
    Last edited by dewurster; 10-21-2014, 08:10 PM.

    #2
    DEW, I would expect that for wizard access via the default indicator you posted. It's defining the custom bar color inputs via the GridCategory's so the wizard interface could not set those. In the changed one attached I have moved the Colors to the Category attribute so the Color input would not be used for the generation of the overload to call the indicator at all. This will mean your wizard condition using this study should work normally going forward.
    Attached Files
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by WHICKED, Today, 02:02 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by selu72, Today, 02:01 PM
    0 responses
    3 views
    0 likes
    Last Post selu72
    by selu72
     
    Started by f.saeidi, Today, 12:14 PM
    8 responses
    21 views
    0 likes
    Last Post f.saeidi  
    Started by Mikey_, 03-23-2024, 05:59 PM
    3 responses
    49 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by Russ Moreland, Today, 12:54 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X