102472036
commented on
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
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

2
6
102472036
commented on
I have tested the code to do place buy orders and backtested the code. It works on entering new buy positions. However, when I try to use liquidate these buy positions, it does not work on backtest. Is it not possible to backtest closing positions? Do I use liquidate or do I use sell orders to close these positions?
1
1
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?
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.