TOS Script - error? what am i doing wrong? - ThinkOrSwim | futures io social day trading
futures io futures trading


TOS Script - error? what am i doing wrong?
Updated: Views / Replies:1,755 / 2
Created: by ticker Attachments:0

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

Reply
 
Thread Tools Search this Thread
 

TOS Script - error? what am i doing wrong?

  #1 (permalink)
Elite Member
Houston TX
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: TF
 
ticker's Avatar
 
Posts: 49 since Oct 2010
Thanks: 63 given, 9 received

TOS Script - error? what am i doing wrong?

To my TOS wiz's, Id appreciate any help you may offer.

The following code is giving me an error "Invalid state: if at 2:1"

def b = (condition here...) ;
if (b = 0) {
b = 1;
}

It is not liking my if statement (without an else). Im basically trying to say, if b = 0, then make it a 1 instead, or else leave it alone as b.

Thanks to anyone who may help.
Ticker

Reply With Quote
 
  #2 (permalink)
Elite Member
desert CA
 
Futures Experience: Intermediate
Platform: NT7, TOS
Broker/Data: AMP/wCQG, TDA
Favorite Futures: CL,YM
 
Posts: 2,027 since Jul 2011
Thanks: 2,211 given, 1,551 received

Hi, there's no branching if-then-else statement by itself. It's usually a contained expression in other statements. Here's what should work.


def i = ( condition );
def b = if (i == 0) then 1 else i;


Last edited by Cloudy; May 3rd, 2013 at 04:58 AM.
Reply With Quote
The following user says Thank You to Cloudy for this post:
 
  #3 (permalink)
Elite Member
Houston TX
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: TF
 
ticker's Avatar
 
Posts: 49 since Oct 2010
Thanks: 63 given, 9 received



Cloudy View Post
Hi, there's no branching if-then-else statement by itself. It's usually a contained expression in other statements. Here's what should work.


def i = ( condition );
def b = if (i == 0) then 1 else i;

That worked excellent. Thank you @Cloudy !

Reply With Quote
The following user says Thank You to ticker for this post:

Reply



futures io > > > > TOS Script - error? what am i doing wrong?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninja indicator script error maxwelltrader NinjaTrader 2 January 30th, 2013 05:16 PM
Wrong platform/charting choices from error in registration. itsabouttime Traders Hideout 2 December 12th, 2012 03:07 PM
Odds Are, It's Wrong kbit Off-Topic 24 November 18th, 2011 04:28 PM
NT indicator script compiling issuses / error while importing skyfly NinjaTrader Programming 8 July 20th, 2010 01:56 AM
How do you clear a NT script error from bad indi, cannot compile until addressed. dreambig The Elite Circle 6 July 6th, 2010 09:59 AM


All times are GMT -4. The time now is 05:18 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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
Page generated 2017-12-13 in 0.07 seconds with 19 queries on phoenix via your IP 54.92.194.75