maverickmitch
Member
I am looking to use the getquantity() function to actively show whether I'm in a position or not. My issue is that this function does not work with tick charts. This code below uses entryprice() but it only recognizes if I am in a position after the bar closes, not in real-time.
Would anyone know how to solve this?
Would anyone know how to solve this?
Code:
def entry = EntryPrice();
def entryPrice = if !IsNaN(entry)
then entry
else entryPrice[1];
plot hasEntry = !IsNaN(entry);
hasentry.setpaintingStrategy(paintingStrategy.boolean_ARROW_UP);