how to print the triggered symbol of the triggered event
I see we can add multiple trigger symbols to one strategy. When the event is triggered, the event is logged in the running log. I didn't find a way to print which symbol(in my case which stock) is this event triggered for. Anyone has any idea? Thanks.
I tried to define a global variable to a symbol and throught I can assign to the triggered symbol in the code after the condition is triggered but it doesn't have this option
Disclaimer: Community is offered by Moomoo Technologies Inc. and is for educational purposes only.
Read more
Comment
Sign in to post a comment
103143809 : So your question has been around for so long, and no one here is going to use this quantitative transaction
stevenlsf1 OP : I already feedback to moomoo services support email and I am informed this function is not supported
102472036 : I'm sorry for replying so late. I'm the product manager of moomoo algo.
If you use multiple trigger symbols, the trigger event from each trigger symbol has no difference to this running cycle. Because when triggered in this cycle, every trigger symbol's data will be fresh.
Let me guess your demand. You want to assign the triggle symbol of this trigger event, to a global variable, right?
stevenlsf1 OP : I want to be able to print the trigger symbol in the alert message box when strategy is executed . In runlog, it is difficult to identify which symbol is the strategy executed if I setup multiple triggers symbols for one strategy. Currently the alert message box function doesn’t support variable
102472036 stevenlsf1 OP : Yeah, got it. You can try to code it to insert variables. This is an example:
alert(title="1", content=str(self.trigger_symbol1) + " is golden cross")
We will support inserting variables in the alert card later in Q3. Thank you.
stevenlsf1 OP 102472036 : May I know if this update will be available by end of Q3 as mentioned?