In ThinkorSwim, how do you select last price/current price is greater/less than study? I only see high low open close.
Another example that I found
Code:
# beginning of code -------------------------------
# puts a label with close/last price on the chart
input price = close;
plot CloseLabel = price;
CloseLabel.SetDefaultColor(color.BLUE);
CloseLabel.hide();
AddChartLabel(yes, concat(CloseLabel, " : Close Price"), CloseLabel.TakeValueColor());
# end of code ---------------------------------
Another example that I found
Code:
close("period" = AggregationPeriod.DAY, "priceType" = PriceType.LAST) from 3 bars ago is less than or equal to SimpleMovingAvg()."SMA" from 3 bars ago