I just want an alert to trigger once after passing a certain price, then disable itself to avoid any future triggers.
I’d like to place partial profit taking with alerts without worrying about more than one orders being placed because of price fluctuations.
How can I do this? Thanks
Unless I am mistaken, it is not possible to stop an alert automatically after its first occurrence, sorry!
I’m trying to think of using multiple conditions as a workaround.
So far I’ve come up with:
c1 = a close of the current 15m bar above a drawn price line, c2 = before a certain date & time.
It’s not ideal as there can still be multiple 15m closes before that time, if I’m not around to catch the first. Can I do anything better?
EricParticipant
Master
Use a binary indicator (cross over/under zero)
1 the condition you use (c1)
-1 something that never happens (c2)
// Detection donk
D5T = HIGHEST[5](HIGH)[1]
c1 = CLOSE > D5T
// Detection donk
D15B = LOWEST[15](LOW)[1]
c2 = LOW < D15B
IF c1 THEN
res = 1
ELSIF c2 THEN
res = -1
ENDIF
return res as "DONK BINARY"
Has code above been backtested? Considering using a tick timeframe to buy a certain price and set a certain range at open. That’s not to say that same price won’t be hit again. Would it be likely given the extreme volatility at open? How instantaneous are the triggers? Is best option to disable the alert once executed either manually otherwise surely this could be coded.