- ago
With the switch from WL7 Build 6 to WL7 Build 7 the (very well hidden) checkbox "Retain NSF Positions" was reactivated by default. In order to reduce confusion caused by unexplained sell signals, all the signals for retained NSF positions should be clearly marked by the abbreviation "NSF". So users that are not familiar with the concept get a chance to look up what is behind these signals.
4
1,445
Solved
16 Replies

Reply

Bookmark

Sort
Glitch8
 ( 10.10% )
- ago
#1
NSF Positions are not displayed at all, so that can't be marked. Are you interested in seeing them? It's possible to write them to the debug log, for example.
0
- ago
#2
The NSF positions are not displayed as positions. But if you check "Retain NSF Positions" you get signals to close positions that are not open as they are NSF positions. The signals for these (not open) positions should be marked.
1
Cone8
 ( 5.57% )
- ago
#3
I think that idea has merit.

I'm going to change the title from "Can NSF Positions be marked?" to "Can NSF Position Exit Signals be marked?" and make it a feature request.
0
- ago
#4
I notice how these NSF positions have confused some users so let me upvote this request.
0
Glitch8
 ( 10.10% )
- ago
#5
It's completed for Build 8.
1
- ago
#6
I am trying to troubleshoot why I am getting NSF positions. I'm only trading 2 symbols at a time.

My understanding is that if the option to Retain NSF positions is checked, NSF positions will be "retained", but I'm not sure I understand what that means. Does it mean they are not counted toward backtest performance results, but they will show up in the positions list after backtest? I haven't been able to figure out how to identify specific positions in the list that triggered NSF.
0
Cone8
 ( 5.57% )
- ago
#7
Explained in Help > Strategy > Strategy Settings > Advanced Strategy Settings, and, there's even a link to a video where I go over an example.

In a nutshell, NSF Positions themselves are not part of the backtest results, but retaining/not retaining can influence the logic of a strategy.
0
- ago
#8
I've been over both and didn't see how I can identify the specific trades that were marked NSF.
0
Cone8
 ( 5.57% )
- ago
#9
They're identified by a boolean NSF property for both Position and Transaction.
0
- ago
#10
QUOTE:
They're identified by a boolean NSF property for both Position and Transaction.

I'm sorry. I don't understand at all. How / where do I see / use this property? Is there an image or example anywhere?
0
Glitch8
 ( 10.10% )
- ago
#11
Cone is talking about a property of the Transaction and Position classes, for C# coded Strategies.

You won't see NSF Positions in the Positions list because they are not displayed. However you should see little "N"s next to Signals that are NSF. We do display all the NSF signals because we can never be sure if your actual trading is in complete sync with what happened in the backtest in terms of NSF skipping positions.
0
Glitch8
 ( 10.10% )
- ago
#13
Here is an example of some Signals for NSF Positions:

0
- ago
#14
But signals are only for the current day, right? I want to know which historical signal in the backtest caused NSF. How do I do that?
0
Cone8
 ( 5.57% )
- ago
#15
This should work. Add this to your code.

CODE:
   /** Put this at the top - using System.Linq; **/       public override void PostExecute(DateTime dt, List<BarHistory> participants)       {          List<string> nsfs = GetPositionsAllSymbols(true).Where(x => x.NSF == true).Where(x => x.EntryDate == dt).Select(y => y.Symbol).ToList();          WriteToDebugLog(dt.ToShortDateString() + "\tNSFs: " + String.Join(", ", nsfs));       }
1
Best Answer
- ago
#16
Yes, that worked. I was able to identify what was happening and made a code mod that eliminated the NSF's. Thank you.
2

Reply

Bookmark

Sort