Show Number Days Since Opening Position Column

mfsteve

Member
VIP
You motivated me to learn how to use a counter in TS . :cool:

This is counting the bars on the daily chart:

Code:
def my_shares = GetQuantity();
def count = if GetAveragePrice() != GetAveragePrice()[-1] then 0 else count[1] + 1;
AddLabel(my_shares, " Bought " + my_shares + " shares " + count[1] + " days ago ", Color.White);

Beer run!
 
Last edited:

Similar threads

Top