|August 19th, 2015, 06:03 AM||#1 (permalink)|
Los Angeles, CA/USA
Futures Experience: Beginner
Favorite Futures: Futures
Posts: 12 since Aug 2014
Thanks: 3 given, 1 received
I'm trying to get thinkscript to populate a def based on a value returned from a conditional statement for example:
def Bias = if upBias > dnBias1 and upBias <= dnBias then 1 else if upBias < dnBias1 and upBias >= dnBias then 2 else 0;
The above statement is fine in thinkorswim, it's the next statement that I'm not sure how to write in thinkorswim:
if Bias == 1 then line1 = upBias and line2 = dnBias else line1 = dnBias and line2 = upBias
How do I write the above in a way that thinkscript likes? Thank you for any help, this is baffling me.
Edit: Hi Admins, I didn't see the thinkorswim Programming sub-forum above... can we move this post to that sub-forum? Thank you. Sorry about that.
Last edited by TraderEnlight; August 19th, 2015 at 12:20 PM. Reason: wrong location