Not getting strategy.exit alerts
Hi,
a newbie here.
wrote a test script based on ema cross, for some reason i get strategy.entry alerts but not strategy.exit
On the example below, i've added an "Order fills" alert,
i did get the "Long cross entry" and "Short cross entry" alerts, but did not get the "Close short trail TP" that was triggered by my strategy.exit
any input would be much appreciated.
Posted Sep 7, 2022, 8:27 AM UTC
12
In your exit call, you need to refer to the entry trade id using the "from_entry" parameter.
strategy.exit("ExitShort", from_entry="SHORT"....)
Thanks a lot for the reply, ill try it!