Multi-position logic - futures io
futures io



Multi-position logic


Discussion in Platforms and Indicators

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

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

 
Search this Thread
 

Multi-position logic

(login for full post details)
  #1 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 840 received

Need help with code logic (in either c# or c++, doesn't matter).

I want to enter the first position at 1 unit based upon certain conditions.

Then add a second unit based upon certain conditions. The second unit has target and reversal conditions that are separate from the first unit.

If the second unit meets its target conditions, then it closes.

If the second unit meets its reversal conditions, then it reverses and creates a second position. The second position is managed with the same rules, but independently from the first position and the second position can also add a second unit. Continuing with the logic, the second unit on the second position can create a third position if the reversal conditions are met, etc. In other words, each position is capable of spawning a new position that is managed independently from the others.

Obviously, the first position can be long and the second position can be short at the same time, so that the actual net position is flat, but the virtual positions will persist. I can create the logic to net the virtual entries/exits of all positions to arrive at a net order to buy or sell x number of units.

I just can't figure out how to spawn a new position with the total number of positions limited to a desired amount. I keeping thinking that I'm over thinking it, but under thinking it isn't working either.

Thanks for any help.

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
1 min chart v-shape scan help please
ThinkOrSwim
Bank account
Psychology and Money Management
Experience with AGN (Introducing Broker)
Brokers
Color templates for MT5 40 items
Platforms and Indicators
Time Segmented Volume
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Al Brooks Trading Course (www.brookstradingcourse.com)
29 thanks
Fail to Plan - Plan to Fail: What can go wrong?
22 thanks
Losing faith...
21 thanks
Where do you get your financial news & investment ideas?
18 thanks
Holding futures overnight
17 thanks
 
(login for full post details)
  #3 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 840 received


I figured it out myself. Thanks for nuthin.

Started this thread Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
(login for full post details)
  #4 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 840 received


Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators > Multi-position logic


Last Updated on November 5, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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