How do I add a label with price?

JBTrades

JBTrades

New member
Hi Guys, when I'm trading I use Active Trader to buy and sell immediately, because of this I don't know the exact price I enter a trade at. Would it be possible to create a label that has the price I entered a trade at? Green for long and Red for short? Any help is appreciated.
 
JBTrades

JBTrades

New member
Just realized TOS has this built-in. Please disregard.
 
Branch

Branch

Member
VIP
Hi Guys, when I'm trading I use Active Trader to buy and sell immediately, because of this I don't know the exact price I enter a trade at. Would it be possible to create a label that has the price I entered a trade at? Green for long and Red for short? Any help is appreciated.
Code:
# Branch Investment Group (BIG)

#wizard input: length1
#wizard text: -period
#wizard input: averageType1
#wizard text: crosses
#wizard input: crossingType
#wizard input: length2
#wizard text: -text
#wizard input: averageType2
#wizard text: GC
#wizard input: price


input price = Ohlc4;
input length1 = 4;
input length2 = 100;
input averageType1 = AverageType.SIMPLE;
input averageType2 = AverageType.SIMPLE;
input crossingType = {default above, below};

def avg1 = MovingAverage(averageType1, price, length1);
def avg2 = MovingAverage(averageType2, price, length2);


AddLabel (yes, if Price > avg2 then "BULL" + "" else "" , Color.LIGHT_GREEN);
AddLabel (yes, if Price < avg2 then "BEAR" + "" else "" , Color.RED);
 

Similar threads

Top