Los Angeles, CA/USA
Experience: Beginner
Platform: thinkorswim
Trading: Futures
Posts: 12 since Aug 2014
Thanks Given: 3
Thanks Received: 1
|
Hi All,
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[1] <= dnBias[1] then 1 else if upBias < dnBias1 and upBias[1] >= dnBias[1] 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.
|