Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Is there a way to do this?
Updated February 27, 2011
Top Posters
looks_one
richw
with 3 posts (0 thanks)
looks_two
Big Mike
with 1 posts (1 thanks)
looks_3
Quick Summary
with 1 posts (0 thanks)
looks_4
sam028
with 1 posts (1 thanks)
trending_up
1,432 views
thumb_up
2 thanks given
group
2 followers
forum
5 posts
attach_file
0 attachments
Is there a way to do this?
February 26th, 2011, 02:02 PM
Salt Lake City, UT
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,246
Thanks Received: 1,541
I want to be able to create a loop that will place X number of orders without having to enter each one separately.
Code
int x = 0 ;
double y = 0 ;
int z = 1 ;
while (x < 10 )
{
_long1+x = EnterLongLimit( 0 , true , 1 , _longFirstPrice- .05 -y, "L" +z);
x = x + 1 ;
y = y + .05 ;
z = z + 1 ;
}
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
February 26th, 2011, 05:59 PM
Posts: 3,761 since Jun 2009
Thanks Given: 3,823
Thanks Received: 4,629
Yes, but your EnterLongLimit() syntax is false, in this case it's more:
Code
EnterLongLimit ( 1 , _longFirstPrice - .05 - y , "L" + z . ToString ())
and you should use for() loops instead of while().
Success requires no deodorant! (Sun Tzu)
The following user says Thank You to sam028 for this post:
February 26th, 2011, 08:27 PM
Salt Lake City, UT
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,246
Thanks Received: 1,541
What about the very beginning? Is there a workaround to enable a variable in the IOrder object? That seems to be the most troublesome part.
Code
_long1+x = EnterLongLimit( 0 , true , 1 , _longFirstPrice- .05 -y, "L" +z);
February 26th, 2011, 08:54 PM
Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,319 since Jun 2009
Thanks Given: 33,139
Thanks Received: 101,473
Create an array and then increment it during the loop to store the IOrder.
Mike
The following user says Thank You to Big Mike for this post:
February 26th, 2011, 09:34 PM
Salt Lake City, UT
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,246
Thanks Received: 1,541
I will try that suggestion.
Last Updated on February 26, 2011