NexusFi: Find Your Edge


Home Menu

 





debug help for C# list


Discussion in NinjaTrader

Updated
    1. trending_up 1,748 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?
Fed Hike Odds at 57% After Warsh: England Surges 12.9%, …
Prediction Markets & Event Contracts
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Thanks Mike. Godspeed.
The Elite Circle
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 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