debug help for C# list - futures io
futures io



debug help for C# list


Discussion in NinjaTrader

Updated
    1. trending_up 650 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

debug help for C# list

(login for full post details)
  #1 (permalink)
 vantojo 
Neuquen, Argentina
 
Experience: Intermediate
Platform: Ninja
Trading: CL, TF, 6S, NG, sometimes GC
 
Posts: 200 since Jul 2012
Thanks: 25 given, 42 received

Hi guys and gals,

(this is for NT 7...haven't ported yet... )

Need help debugging the C# List in the attached indicator

Purpose is to capture the price at hand-placed horizontal lines into an internal C# List.

It has a toolbar toggle button for Long or Short. When the Capture button is pressed on a Long toggle the black horizontal lines are turned to Green, and Short toggle turns the black horizontal lines to Red.

(In this indicator the List is local, but it will be global when integrated into my system. That is why I clear the list of the MasterInstrument.Name, because in the global context, the list will hold multiple instruments. )

The problem is, AFTER the price/tags are added to the List, I then print the list....and all entries in the list are set to the last value added.

I can't figure out what is wrong. Can anyone fix this?

Thanks!!!

Attached Files
Register to download File Type: cs AASRTest.cs (7.6 KB, 6 views)
Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(106 thanks from 17 posts)
looks_twoSalao's Journalby Salao
(33 thanks from 8 posts)
looks_3Deeteeís DAX Trading Journal (time based)by Deetee
(28 thanks from 11 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(14 thanks from 9 posts)
looks_5Maybe a little bit different journalby Malykubo
(9 thanks from 8 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Would You Sell Your System?
73 thanks
The Crude Dude Oil Trading System
44 thanks
Big Mike in Ecuador
41 thanks
The New Micro Contract - MICRO BITCOIN coming May 2021
25 thanks
futures io site changelog and issues/problem reporting
24 thanks
 
(login for full post details)
  #2 (permalink)
 ratfink 
Birmingham UK
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
 
ratfink's Avatar
 
Posts: 3,651 since Dec 2012
Thanks: 17,422 given, 8,403 received

Hi @vantojo,

You need to make a 'new' thisSR for each item you want to add to the list, otherwise you are just copying the same item into the list each time.

Cheers

Travel Well
Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #3 (permalink)
 vantojo 
Neuquen, Argentina
 
Experience: Intermediate
Platform: Ninja
Trading: CL, TF, 6S, NG, sometimes GC
 
Posts: 200 since Jul 2012
Thanks: 25 given, 42 received


muchisimas gracias senor

Started this thread Reply With Quote
The following user says Thank You to vantojo for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > debug help for C# list


Last Updated on August 31, 2017


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April

Seven Trading Mistakes Solved With Smart Trading Tools w/Brannigan Barrett

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts