NexusFi: Find Your Edge


Home Menu

 





debug help for C# list


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

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
Elite Membership required to download: AASRTest.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Fired a Missile at Israel Last Night. The $8M June …
Prediction Markets & Event Contracts
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
Commodities
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
3 thanks
  #2 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,550 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,427

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 NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


muchisimas gracias senor


Started this thread Reply With Quote




Last Updated on August 31, 2017


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts