I'm trying to print the values from an ArrayList - NinjaTrader Programming | futures io social day trading
futures io futures trading


I'm trying to print the values from an ArrayList
Updated: Views / Replies:2,685 / 13
Created: by kaywai Attachments:1

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 1  
 
Thread Tools Search this Thread
 

I'm trying to print the values from an ArrayList

  #11 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received


kaywai View Post
I change it like below, and I still don't know whether I'm getting anything into the ArrayList. Would you mind please helping?

 
Code

if (TDBuyExtendedSetupFX().buysetupmoveiscompleted)
{
 
drawtdstbuyline = true;
setuphigh = TDBuyExtendedSetupFX().hhbs;
TDSTBuy.Add(setuphigh);
if (TDSTBuy.Count > 2)
{
TDSTBuy.RemoveAt(0); //if TDSTBuy is filled, drop the oldest value
}
Console.WriteLine( "TDSTBuy" );
Console.WriteLine( " Count: {0}", TDSTBuy.Count );
Console.WriteLine( " Capacity: {0}", TDSTBuy.Capacity );
Console.Write( " Values:");
PrintValues(TDSTBuy);
}
}
publicstaticvoid PrintValues( IEnumerable TDSTBuy)
{
foreach (Object obj in TDSTBuy ) 
Console.Write(" {0}", obj);
Console.WriteLine();
}


I suggest adding some debug Print() statements at various points in your code to see what is being executed or not and taking it from there.

Reply With Quote
 
  #12 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Hi,

I actually have some Print() statements which I omitted from the code. Which leads me back to my initial question, How do I print values from an ArrayList?

The code is fine upto " setuphigh = TDBuyExtendedSetupFX().hhbs;"

Beyond that, I'm not sure as I don't know how to print values from an ArrayList.

Would appreciate if you could help. I tried the code provided above but I get zero prints wrt the ArrayList in the output window.

Regards

Kay Wai



Reply With Quote
 
  #13 (permalink)
 Vendor: www.innovative-trading-solutions-online.com 
Hartford, CT. USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: TF
 
RJay's Avatar
 
Posts: 677 since Jun 2009
Thanks: 726 given, 740 received


for (idx = startpoint; idx < endpoint; idx++)

{
XXXX = arrayvalues[idx];
Print("idx = " + idx + " XXXX = " + XXXX);
}

Maybe you could cycle through the array values.

Just add the value to print with each idx value.


Reply With Quote
The following user says Thank You to RJay for this post:
 
  #14 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Thanks Rjay!

Will see whether I can code what you suggested!

Kay Wai

Reply With Quote

Reply



futures io > > > > > I'm trying to print the values from an ArrayList

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extract nearest support price from arraylist? zacharydw00 NinjaTrader Programming 15 January 1st, 2012 02:57 AM
Anyone using Print+ from moneyflowbars.com? Need your help Chipmunk Trading Reviews and Vendors 5 October 20th, 2010 05:30 AM
Print format for Forex variables arjfca EasyLanguage Programming 2 October 3rd, 2010 10:57 AM
Redirect Print output to my logger dimkdimk NinjaTrader Programming 1 January 14th, 2010 05:43 AM
Translating EMA-values to ZN-values or visaversa max-td NinjaTrader Programming 17 June 22nd, 2009 04:42 PM


All times are GMT -4. The time now is 02:04 PM.

Copyright © 2017 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
Page generated 2017-12-12 in 0.09 seconds with 20 queries on phoenix via your IP 54.163.209.109