Code example for displaying UNREALIZED PnL for ALL open positions for 1 Account? - Traders Hideout | futures io social day trading
futures io futures trading

Code example for displaying UNREALIZED PnL for ALL open positions for 1 Account?
Updated: Views / Replies:11,510 / 31
Created: by vincentmarchi Attachments:4

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

Thread Tools Search this Thread

Code example for displaying UNREALIZED PnL for ALL open positions for 1 Account?

  #31 (permalink)
Market Wizard
Birmingham UK
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
ratfink's Avatar
Posts: 3,441 since Dec 2012
Thanks: 12,790 given, 7,530 received
Forum Reputation: Legendary

resist View Post
I am working a lot backtesting my strategies using your indicator and I can confirm that itīs working fine if you start strategy (of course) after starting indicator. I have still position and feed in one multichart together, strategies are taking the global variable of totalvalue.

Working with MA makes no sense to me because I need the total value or average value in my strategy (I also added a calculation for average value as global variable, itīs working, too but has not improved strategy).

As I made some interesting observations my question to you:
Could you add a second account - I would like to test opening "dummy" positions on SIM parallel with real account. I think you got my question, if not, again: I want to open e.g. YM, CL, ES trades on SIM and CL on trading account but I need the total of all 4 positions.

Thank you again. @ratfink

Great, and a nice idea too, all we need is to make the totalValue into a per account list, I'll post a version.


Travel Well
Reply With Quote
The following user says Thank You to ratfink for this post:
  #32 (permalink)
Elite Member
Berlin Germany /Alicante Spain
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: DDT/Rithmic, Global/CQG, IB, Mirus(Ninja)/MarketDelta
Favorite Futures: Futures
Posts: 148 since Jan 2010
Thanks: 362 given, 66 received

I think we (you) do not need to make it working parallel on 2 acounts, I can calculate all (e.g. YM, ES, NQ and CL) together on SIM account with strategy - and run a trading strategy only trading CL on real account - only a sample. Only extra work is to have two charts with CL strategy running, one SIM one real - so everything can stay as it is, take your time for better ideas. )))

Last edited by resist; August 11th, 2015 at 04:51 PM.
Reply With Quote
The following user says Thank You to resist for this post:


futures io > > > Code example for displaying UNREALIZED PnL for ALL open positions for 1 Account?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to track outside account positions in TWS? swinger IB Trader Workstation 1 February 18th, 2015 12:51 AM
Only Close Open Positions? davetapson AmiBroker 0 September 23rd, 2014 03:59 AM
Open Traders Positions Athan The Elite Circle 10 March 31st, 2013 12:29 AM
Displaying net PNL patbateman NinjaTrader 0 September 30th, 2012 08:02 PM
Account position: How to differentiate positions arjfca The Elite Circle 5 February 5th, 2011 02:27 PM

All times are GMT -4. The time now is 03:59 PM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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 2018-05-22 in 0.07 seconds with 24 queries on phoenix via your IP