NexusFi: Find Your Edge


Home Menu

 





ThinkScript (TOS) Programming Question


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one Pharmakon with 2 posts (0 thanks)
    2. looks_two Curbfeeler with 1 posts (0 thanks)
    3. looks_3 DavesRisk with 1 posts (0 thanks)
    4. looks_4 optntdr13 with 1 posts (0 thanks)
    1. trending_up 15,473 views
    2. thumb_up 2 thanks given
    3. group 9 followers
    1. forum 10 posts
    2. attach_file 1 attachments




 
Search this Thread
  #11 (permalink)
 
Pharmakon's Avatar
 Pharmakon 
Paris France
 
Experience: Beginner
Platform: TradingView
Broker: CQG
Trading: ES1!, CL1!, DY1!
Posts: 45 since Jan 2016
Thanks Given: 119
Thanks Received: 28


Curbfeeler View Post
The problem is this hasn't been defined in my code yet, so I can't reference it. Thinkscript does not give you any way to define a variable at the top of the code and then change it towards the bottom of the code. So for instance, if I could drop myself a little breadcrumb in ThinkScript and tell myself that the two lines had been 30 ticks apart, I'd be fine--so long as I could reference this at the top of my code later.

Hi !


It will be easier to paste your code here to be able to see it. I don't know how to code on ThinkorSwim, but popular languages make it possible. You can define the variable at the top of your code and change it at the bottom, no ?


Regards,
P.


Follow me on X Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
Prop Firm Tracked Payouts Hit $115M in Q1 but Growth Fla …
Funded Trading Evaluation Firms
Probability Collapse: Bitcoin $150k Craters from 15% to …
Prediction Markets & Event Contracts
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
30 Sessions
21 thanks
Sober Journey With S&P
21 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks




Last Updated on March 8, 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