NexusFi: Find Your Edge


Home Menu

 





Instrument position help!


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3

So, I've created a strategy that only fires when flat. Only problem is that Position.MarketPosition reflects ONLY on a position that the strategy has created!. In other words, If I enter a position manually, the strategy wont pick it up!.

Ive tried several methods to pick up the current position of the instrument that the strategy is running on:
Positions[0] (doesn't work)
Accounts.Positions (returns all positions of all accounts)

It seems as though Instrument.Position is what I would need, but does that exist?, or is there another method anyone else has used to find the position of the current instrument of the strategy, without being triggered by the strategy itself?

I've spent many many days on this.

Thanks in advance!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Thanks Mike. Godspeed.
The Elite Circle
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
  #3 (permalink)
 choke35 
Germany
Market Wizard
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
Posts: 2,622 since Feb 2013
Thanks Given: 5,101
Thanks Received: 6,558



kidvic View Post
So, I've created a strategy that only fires when flat. Only problem is that Position.MarketPosition reflects ONLY on a position that the strategy has created!. In other words, If I enter a position manually, the strategy wont pick it up!.

Ive tried several methods to pick up the current position of the instrument that the strategy is running on:
Positions[0] (doesn't work)
Accounts.Positions (returns all positions of all accounts)

It seems as though Instrument.Position is what I would need, but does that exist?, or is there another method anyone else has used to find the position of the current instrument of the strategy, without being triggered by the strategy itself?

I've spent many many days on this.

Thanks in advance!

A classical rookie fault. You are trying to mix a discrete == unmanaged approach with a standard NT strategy == managed approach.
For sorting it out start with NinjaTrader Version 7 . If you still want to go on with unmanaged positions that - from the NT point
of view - drop from anywhere into the account, you will have to write your own syncs. For that start with NinjaTrader Version 7 .

P.S.: In the NexusFi download section you find additional order & position management examples.


Reply With Quote




Last Updated on August 26, 2016


© 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