NexusFi: Find Your Edge


Home Menu

 



Showing results 1 to 2 of 2
Search: Posts Made By: Cloudy
Forum: ThinkOrSwim May 30th, 2013, 09:03 PM
Replies: 3
Views: 3,488
Posted By Cloudy
Maybe this will work for you: def newDay =...

Maybe this will work for you:

def newDay = if getDay() != getDay()[1] then 1 else 0;
def new_var;
def x;

new_var = x[1]+1;
x = if newDay then new_var else x[1];

plot xgraph = x;
Forum: ThinkOrSwim May 30th, 2013, 08:51 AM
Replies: 3
Views: 3,488
Posted By Cloudy
Hi, if you're using the daily time frame, then...

Hi, if you're using the daily time frame, then you can have TOS reference the previous day's bars and defined variables by [n] where "n" is number of days back.

So it could be:

def new_var;...
Showing results 1 to 2 of 2

What unexpected challenges have you encountered while trading on a "Funded Trader" platform?

 


 
 


© 2024 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 - Privacy Policy - Downloads - Top