Here is my code currently when long or short entry im having to wait for exit or stop to plot once either is hit. Is there a way to plot points as soon as entryt is taken to see where the proit target is and the stop target is. Thank in advance.
# Long AddOrder(tickcolor = Color.GREEN, arrowcolor = Color.RED, name = "long", tradeSize = contracts, condition = condition, type = OrderType.BUY_to_open); # Profit def target = EntryPrice() + ATR() * profit_mult; AddOrder(type = OrderType.SELL_to_close, high[-1] >= target, tickcolor = Color.GREEN, arrowcolor = Color.GREEN, name = "Target", price = target); # Trailing stop def stop = EntryPrice() - ATR() * stop_mult; AddOrder(OrderType.SELL_to_close, low[-1] <= stop, tickcolor = Color.GRAY, arrowcolor = Color.GRAY, name = "Stop", tradeSize = contracts, price = stop);
Last edited by a moderator: