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

Property type

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

    Property type


    Hi All,

    Attached is a stripped down indicator illustrating a custom type with an indicator property of type List<TestType>

    Everything is working fine except the stroke is the same for each element in the list. Its like it copies the reference from the previous stroke and is adding the same stroke to each element in the list.

    In the graphic below the "First" was created with a color of Green. The "Second" value was created as red and it will change the first value to red as well. All instances will have the same stroke value.

    I feel its something simple I am overlooking and I'm hoping another pair of eyes on this will reveal a simple solution.

    Thank you !

    Test Indicator.zip
    Click image for larger version

Name:	20220618_100026_WS2.png
Views:	164
Size:	15.4 KB
ID:	1205630
    Last edited by Bidder; 06-18-2022, 10:10 AM. Reason: Add graphic

    #2
    Hello Bidder,

    Try using the code from the SampleIndicatorTypeConverter from the regions 'Use Case #5: Display a custom collection/list with user defined values at run time' as a base. Adapt the PercentWrapper class to your TestType class.

    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Taddypole, 04-26-2024, 02:47 PM
    8 responses
    68 views
    0 likes
    Last Post NinjaTrader_PatrickH  
    Started by ttrader23, Yesterday, 09:04 AM
    5 responses
    26 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by KonAdams, 05-07-2024, 10:53 PM
    10 responses
    27 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by kevinenergy, 02-17-2023, 12:42 PM
    119 responses
    2,839 views
    1 like
    Last Post DTSSTS
    by DTSSTS
     
    Started by reynoldsn, Today, 07:23 AM
    2 responses
    7 views
    1 like
    Last Post reynoldsn  
    Working...
    X