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 Kaledus, Today, 01:29 PM
    2 responses
    7 views
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by frankthearm, Yesterday, 09:08 AM
    13 responses
    45 views
    0 likes
    Last Post frankthearm  
    Started by PaulMohn, Today, 12:36 PM
    2 responses
    16 views
    0 likes
    Last Post PaulMohn  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    2 responses
    55 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    37 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Working...
    X