Assign value to a variable in IF..condition

Kindly assist to assign a value to a variable inside IF condition.

Something like this

Need to assign value 10 to “Y”, if value of “X” is greater than 10, else value of “Y” to be assigned as "0"
IF(X>10, Y=10, Y=0)

Regards,
SreeL

which language you are trying? please explain your query in brief,
if you are checking in tradescript then its not possible , check below syntax
IF(Condition, True part, False part)

1 Like

Thanks for your reply…

Yes, I am using Tradescript language.
If it is not possible, please share if any other possible options similar to this on TradeScript, like for loop or anything

Regards,
SreeL