Neverlong8
 ( 0.53% )
- ago
After paper trading several strats all day, I'm receiving this message on several strategies within one of my strategy ranking windows...

Backtest Error: Could not compile the strategy (null Executor).

What could I have done to have caused this error, and how do I correct this?
0
556
10 Replies

Reply

Bookmark

Sort
- ago
#1
And how do you expect us to troubleshoot your compilation error without your code?

QUOTE:
Backtest Error: Could not compile the strategy (null Executor).

Okay, why don't you show us your Execute{block} C# code for starters. Here's a sample.
CODE:
      public override void Execute(BarHistory bars, int idx)       {          if (HasOpenPosition(bars, PositionType.Long))          {             //sell conditions below                       }          else          {             //buy conditions below                       }       }
0
Neverlong8
 ( 0.53% )
- ago
#2
The strategies that became corrupted and can no longer be back tested were ALL "Block Strategies". I never said they were coded strategies.
Sorry I did not read your mind about this.
I do not code.

I'll try to figure this out myself, Thanks
0
Cone8
 ( 16.94% )
- ago
#3
It's hard to help only having the symptoms and no evidence. It might help to know which elements (blocks) are used. Aside from that, I suggest upgrading to the latest builds for WL and extensions.
0
Neverlong8
 ( 0.53% )
- ago
#4
I think I solved this problem, and below are the changes I made to all the strategies affected on my end...
Yesterday I was running and comparing four separate scalping strategies to the WealthLab test account. These four strats place a fair number of orders per day on the 1-Minute time frame. When yesterdays update #160 was auto received, these strats stopped behaving normally, which is typically the case when an update is received during the trading day, so I deactivated the strats and then installed the update. Now, none of them worked at all, as reported above.

Each strategy contains two blocks using RSI as a conditional symbol ranking block. When RSI is replaced with a different symbol ranking indicator (Momentum, for example), the strategies are repaired.

So, my presumption is that the update changed the way RSI is used.
0
Cone8
 ( 16.94% )
- ago
#5
Thanks, good to know.
I'm not aware of a change that would have affected it, but probably just making any change and re-saving/activating the strategy would have fixed it. Try going to back to RSI now.

Update -
Actually, there was an innocuous change to the icon for Weight condition. Honestly, I don't know how that could have affected a strategy, but maybe that was enough to do it.
0
Neverlong8
 ( 0.53% )
- ago
#6
That's the first thing I tried, but no go.
And changing it back again to RSI simply recreates the error.
0
Glitch8
 ( 10.74% )
- ago
#7
Can you open the strategy as a code based strategy, try to compile it, and send any compile errors you see?
0
Neverlong8
 ( 0.53% )
- ago
#8
Sure, here you go....

Compiled at 3/11/2026 16:51:50
37: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
41: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
195: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
196: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
235: The field 'MyStrategy.valRank' is never used
239: The field 'MyStrategy.rank' is never used
237: The field 'MyStrategy.cacheKey' is never used
236: The field 'MyStrategy.bhRank' is never used
254: The field 'MyStrategy.value2' is never used
255: The field 'MyStrategy.trailing' is assigned but its value is never used
0
- ago
#9
QUOTE:
37: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
41: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
195: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'
196: 'RSI' is an ambiguous reference between 'WealthLab.Indicators.RSI' and 'WealthLab.MyIndicators.RSI'

Well, there are several possible fixes for C# code. But if you are using Blocks, I would rename your WealthLab.MyIndicators.RSI to WealthLab.MyIndicators.RSI2 so there isn't a name conflict with WealthLab.Indicators.RSI proper.

Do you really need both RSI definitions in the first place?
0
Glitch8
 ( 10.74% )
- ago
#10
It looks like you created a custom indicator named RSI, delete that custom indicator, restart, and you should be good to go 👍
0

Reply

Bookmark

Sort