NexusFi: Find Your Edge


Home Menu

 





debug help for C# list


Discussion in NinjaTrader

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




 
Search this Thread

debug help for C# list

  #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?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Futures True Range Report
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #2 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425

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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts