sargent11235
New member
Hello,
I have a newbie question. Is it possible to compare the current price (not a previous close but what it actually is at this exact time) to the open price for that particular bar? In otherwords, how much that candle has increased?
I wrote this code but not sure about the second line. Is PriceType.LAST the current price?
I have a newbie question. Is it possible to compare the current price (not a previous close but what it actually is at this exact time) to the open price for that particular bar? In otherwords, how much that candle has increased?
I wrote this code but not sure about the second line. Is PriceType.LAST the current price?
Code:
#in theory this should scan for candle that has grown 5% since
#it has opened
input percentIncrease = 1.05; #5% increase
input priceType = PriceType.LAST; #in theory, report current price???????
def currentPrice = close(priceType=priceType);
plot scan = (currentPrice * percentIncrease) > open;
Last edited by a moderator: