ThinkScript Portfolio Functions Broken? - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

ThinkScript Portfolio Functions Broken?
Updated: Views / Replies:364 / 2
Created: by kula Attachments:1

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

ThinkScript Portfolio Functions Broken?

  #1 (permalink)
Trading Apprentice
Houston Texas
Futures Experience: Beginner
Platform: TOS
Favorite Futures: Crude CL
Posts: 2 since Sep 2016
Thanks: 0 given, 0 received

ThinkScript Portfolio Functions Broken?


Has anyone had success with the ThinkScript Portfolio functions? GetAveragePrice(), GetQuantity(), or GetOpenPL()? TOS keeps giving me no such function errors when trying to use them.

I'm trying to make a simple script on a watchlist or marketwatch column that takes the OpenPL / Trade Price * 100 so I can easily see the % of profits for my covered calls and naked puts so I know if I should close them out if I get good gains and have plenty of DTE. Problem is that I can't seem to get any qty, price, or PL data from my current positions (though I can get all kinds of other data). Is this possible or does TOS have these functions locked down? If so, does anyone know of a clever workaround?

Any help would be greatly appreciated! Thanks!

Reply With Quote
  #2 (permalink)
Trading Apprentice
Houston Texas
Futures Experience: Beginner
Platform: TOS
Favorite Futures: Crude CL
Posts: 2 since Sep 2016
Thanks: 0 given, 0 received


Ok, I figured out that the portfolio functions only work in custom studies for the chart. I've got my percentage showing as a label on the chart, but anyone know of a way to get it into a column on the watchlist or marketwatch grids? I can't use those functions or my custom study outside of the chart for some reason. It's silly, because I can add the individual fields that I want to the MarketWatch grid, I just can't use any of those fields for calculation.

Last edited by kula; October 4th, 2016 at 10:24 AM.
Reply With Quote
  #3 (permalink)
Trading Apprentice
Futures Experience: None
Platform: ThinkOrSwim
Favorite Futures: Eminis ES
Posts: 1 since Aug 2017
Thanks: 0 given, 0 received

TOS script GetAveragePrice doesn't seem to work.

As a test of the function GetAveragePrice, I generated this ThinkOrSwim script
def AP = GetAveragePrice();
plot AP_ = AP;

Here's the script.
The output for AP doesn't make any sense.
Does anyone understand it?

Attached Thumbnails
ThinkScript Portfolio Functions Broken?-tos_study_getaverageprice.jpg  
Reply With Quote


futures io > > > > > ThinkScript Portfolio Functions Broken?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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
Auxiliary functions Error goun Sierra Chart Programming 1 December 15th, 2014 09:26 AM
EUR/USD price decimal in functions LetmeInNow TradeStation 2 May 8th, 2013 12:49 AM
[MC] Functions to draw rectangles with MultiCharts Nicolas11 The Elite Circle 2 June 18th, 2012 09:28 AM
System Optimization Fitness Functions fluxsmith NinjaTrader Programming 27 April 29th, 2011 06:52 PM
Music + neuronal functions max-td Traders Hideout 0 October 12th, 2009 09:04 AM

All times are GMT -4. The time now is 09:27 PM.

Copyright © 2017 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 2017-10-20 in 0.07 seconds with 20 queries on phoenix via your IP