help creating a list. - NinjaTrader Programming | futures io social day trading
futures io futures trading


help creating a list.
Updated: Views / Replies:342 / 9
Created: by kidvic Attachments:0

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
 
Thread Tools Search this Thread
 

help creating a list.

  #1 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received

help creating a list.

hi.
if i have int = 20,

how do i get the close of int candles? (the last 20)

so it would get me Close[20], Close[19], Close[18] etc until Close[0]?

Thanks in advance.


Last edited by kidvic; July 27th, 2016 at 10:01 PM. Reason: clarification
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,373 since Sep 2013
Thanks: 1,648 given, 3,511 received
Forum Reputation: Legendary


yes, correct
where [0] is most recent

Reply With Quote
 
  #4 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


rleplae View Post
yes, correct
where [0] is most recent


Sorry I wasnt clear, I want to creat a list.

not just int, so that the list contains the values.

so lets say int is 40, then it would enumerate (populate a list) 40 values of what I want it to calculate.

it would then keep those values, for when I call on them.

so lets say there was a true on when the value was 30 (of the 40),
then it would give that value.

Reply With Quote
 
  #5 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,373 since Sep 2013
Thanks: 1,648 given, 3,511 received
Forum Reputation: Legendary

This is probably what you want to do :

 
Code
// create a list of int
List<int> myCloseList = new List<int>();

// store the last 20 Close prices in the list
for (int i = 0; i < 20; i++)
{
    myCloseList.Add(Close[i]);
}

Reply With Quote
 
  #6 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


rleplae View Post
This is probably what you want to do :

 
Code
// create a list of int
List<int> myCloseList = new List<int>();

// store the last 20 Close prices in the list
for (int i = 0; i < 20; i++)
{
    myCloseList.Add(Close[i]);
}

Thank you, this is exactly!, now how do I retrieve out of that list, all the ones that had high of 45.00 or greater?

Reply With Quote
 
  #7 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,373 since Sep 2013
Thanks: 1,648 given, 3,511 received
Forum Reputation: Legendary

(The list can be a list of a class and then you can
store various information in every record.)

 
Code
// create a list of int
List<int> myCloseList = new List<int>();

// store the last 20 Close prices in the list
for (int i = 0; i < 20; i++)
{
    myCloseList.Add(Close[i]);
}

// second logic
for (int i= 0; i < myCloseList.Count; i++)
{
 if (myCloseList[i] > 45
  Print("Found record : "+i+" with Close "+Close[i]);
}

Reply With Quote
 
  #8 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


rleplae View Post
(The list can be a list of a class and then you can
store various information in every record.)

 
Code
// create a list of int
List<int> myCloseList = new List<int>();

// store the last 20 Close prices in the list
for (int i = 0; i < 20; i++)
{
    myCloseList.Add(Close[i]);
}

// second logic
for (int i= 0; i < myCloseList.Count; i++)
{
 if (myCloseList[i] > 45
  Print("Found record : "+i+" with Close "+Close[i]);
}

so lets say close[3] and close[6] and close[18] was greater than 45.00 how do I get each of them to exist in a new list, where I can chose based on math.max, and math.min which one value I want, so 18 for math.max and 3 for math.min?
not sure if thats the right logic, but thats what I want to do.

Reply With Quote
 
  #9 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,373 since Sep 2013
Thanks: 1,648 given, 3,511 received
Forum Reputation: Legendary


kidvic View Post
so lets say close[3] and close[6] and close[18] was greater than 45.00 how do I get each of them to exist in a new list, where I can chose based on math.max, and math.min which one value I want, so 18 for math.max and 3 for math.min?
not sure if thats the right logic, but thats what I want to do.

you could create a new list
and add the once that are found to that list

then you will walk through that list and get the max and min out of it

it that sound a bit like chinese
then i would recommend taking the time to read a small c# introduction book
it will greatly pay off

Reply With Quote
 
  #10 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received



rleplae View Post
you could create a new list
and add the once that are found to that list

then you will walk through that list and get the max and min out of it

it that sound a bit like chinese
then i would recommend taking the time to read a small c# introduction book
it will greatly pay off

Greatly appreciate again.

Reply With Quote
The following user says Thank You to kidvic for this post:

Reply



futures io > > > > > help creating a list.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing Bar Color? ericson NinjaTrader Programming 2 December 14th, 2013 05:59 PM
Accessing Trade Markers Xav1029 NinjaTrader Programming 8 November 28th, 2012 05:48 PM
Accessing the clipboard from within an indicator Tempo NinjaTrader Programming 4 February 7th, 2011 04:23 PM
Accessing a chart from a strategy richtobey NinjaTrader Programming 3 December 31st, 2010 04:07 AM
coding to put range of candle beneath each candle anniebee321 NinjaTrader 13 June 18th, 2010 04:20 PM


All times are GMT -4. The time now is 08:42 AM.

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-10-19 in 0.11 seconds with 19 queries on phoenix via your IP 54.196.33.246