playful_fiat#5872
New member
I'm confused why this line of code keeps returning NaN for the buy_price even though my chart shows there are orders entered. I need this buy_price so that I can then determine profit and stop loss targets. 
AddOrder(OrderType.BUY_TO_OPEN, long_condition, open[-1], 1, Color.ORANGE, Color.ORANGE, "Long @ " + open[-1]);
buy_price =EntryPrice();
AddLabel(yes, "Long @" + buy_price, Color.ORANGE);
	
		
			
		
		
	
				
			AddOrder(OrderType.BUY_TO_OPEN, long_condition, open[-1], 1, Color.ORANGE, Color.ORANGE, "Long @ " + open[-1]);
buy_price =EntryPrice();
AddLabel(yes, "Long @" + buy_price, Color.ORANGE);
 
				 
						 
 
		 
 
		 
 
		