- ago
Following code attempts to buy stock1 or stock2 based on the strategy setting's single symbol and some parameters - using 1min scale. Backtest returns correct results. When used in strategy monitor as auto-trade, there is no transaction coming through. Order manager shows no attempt to place any order by SM. I have tried using Dummybroker, TDA and IB without luck. Is there any special consideration for auto-trading trading stock symbols other than the strategy setting's?

thank you


CODE:
public override void Execute(BarHistory bars, int idx) {          int index = idx;          Position foundPosition1 = FindOpenPositionAllSymbols(1);          Position foundPosition2 = FindOpenPositionAllSymbols(2);          if (foundPosition1 == null && foundPosition2 == null)          {             if(bars.DateTimes[index].GetTime() <= Parameters[2].AsInt)             {                if (indicator[index] >= Parameters[0].AsDouble)                {                   _transaction = PlaceTrade(stock1, TransactionType.Buy, OrderType.Market, 0, 1, $"Buy " + Symbol1);                }                if (indicator3[index] >= Parameters[0].AsDouble)                {                   _transaction = PlaceTrade(stock2, TransactionType.Buy, OrderType.Market, 0, 2, $"Buy " + Symbol2);                }             }          }


0
401
Solved
8 Replies

Reply

Bookmark

Sort
Cone8
 ( 24.56% )
- ago
#1
The Strategy Monitor is generating the Signal for the secondary symbol, it's making it to the Order Manager, a signal block is created (you left out these details), but something is impeding the order from being created in this scenario.

We'll work on it! Thanks for reporting.


0
- ago
#2
WL Team - confirming the external symbol trades are working under B14

Thank you - well done
0
Cone8
 ( 24.56% )
- ago
#3
I wish we could accept the kudos, but sadly we cannot. Build 14 didn't touch this area, but Glitch took a look and indicated that there's a good effort in front of us to make secondary symbols work in the context of Auto-Trade.

At the current time, Wealth-Lab cannot reliably Auto-Place and synchronize trading for secondary symbols.
1
- ago
#4
thanks for the update Cone - hopefully a revision for B15?
0
Glitch8
 ( 7.81% )
- ago
#5
There are some complications. The auto-trading works by synchronizing the symbol. What happens if you trade a secondary symbol? What should happen if you run such a strategy in the Strategy Monitor on a DataSet like the Dow 30? You'll get 30 signals for the secondary symbol, clearly this isn't what you want, or is it? You see, there are some serious things to consider here that makes this not such an easy feature to support.
1
- ago
#6
understand. would certainly open new avenues such as the example in #1, option writing and other indirect transactions - very powerful. thanks
0
Cone8
 ( 24.56% )
- ago
#7
Fix for this coming up in Build 15. Preliminary test looks good.
1
Best Answer
- ago
#8
WL Team - thank you !
1

Reply

Bookmark

Sort