Announcement

Collapse
No announcement yet.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    173 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    90 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    129 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    208 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    186 views
    0 likes
    Last Post CarlTrading  
    Working...
    X