I'm doing a live test trade by buying 1 share of a stock to test out a full buy-sell cycle of a study-based conditional order. My problem is that although the BUY condition is always triggered, the SELL condition is never triggered. Here is a minimal test case...
Study code (Tom_TEST):
Order Entry:
SELL Order Rules:
Order History (it's stuck on "WAIT COND" even when condition has been met in 15-minute chart and identical strategy has sold out):
Is there something basic that I'm missing, like you can't use EntryPrice() in a live conditional order? I've successfully executed live study-based conditional orders before and never had any issues, but this is my first time relying on EntryPrice() for an exit signal in a live trade.
Or could it be because I set it to "SELL -100% (of N/A currently)" when I should be setting it to SELL 1 share?
Study code (Tom_TEST):
Code:
def entryPrice = EntryPrice();
# ENTRY
plot Entry = close;
Entry.AssignValueColor(Color.WHITE);
Entry.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
# EXIT
plot Exit = (close - entryPrice) / entryPrice >= 0.001;
Exit.AssignValueColor(Color.WHITE);
Exit.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Order Entry:
SELL Order Rules:
Order History (it's stuck on "WAIT COND" even when condition has been met in 15-minute chart and identical strategy has sold out):
Is there something basic that I'm missing, like you can't use EntryPrice() in a live conditional order? I've successfully executed live study-based conditional orders before and never had any issues, but this is my first time relying on EntryPrice() for an exit signal in a live trade.
Or could it be because I set it to "SELL -100% (of N/A currently)" when I should be setting it to SELL 1 share?
Last edited: