- ago
Hi,

I am running a dip buying strategy with a binance dataset of coins, where my main goal is to manage multiple positions per coin, but limit that to 4 positions - The signal is produced if the number of open positions must be less or equal to 3, as, as shown in the image below.



Now, backtest works fine, and always limits it to maximum 4 positions. But when trading with strategy monitor, that is not the case. Even though the software knows there are already 4 positions open, as shown in the images below, it is STILL producing signals.

I will use DEXEUSDT as an example.





Now if you check the timestamp of the latest DEXEUSDT signal, it got produced even though the software knows there's already 4 open positions.



Is this a potential bug, or am I missing out something here? After checking thoroughly, backtest never open more than 4 buy positions in the past 5 years, which means it's working as intended there.

Edit: sorry, I forgot to finish the title, but I can't fix it now

Title: [Limiting open position count for dataset with multiple positions per coin - a potential issue]
0
141
Solved
9 Replies

Reply

Bookmark

Sort
- ago
#1
You should check "Across portfolio?" since you're running it on multiple coins.
0
- ago
#2
Checking "Across portfolio" limits the open positions for the entire dataset of coins to 4. I want to limit it to 4 per coin if that is possible?

Here's with "across portfolio" checked:

0
- ago
#3
Giving you a backtest example of DEXEUSDT, where open position count for that particular coin does not exceed 4 positions, where with live trading there would be much more of them (backtest would count the current live positions which I have open aswell):



This is with "across portfolio" turned OFF.
0
Glitch8
 ( 13.87% )
- ago
#4
Are you sure you have configured the Strategy Monitor to load the same amount of data as the Strategy window does?

In the example below, the Strategy Window is backtesting using 10 years of data, but the Strategy Monitor only 1 year. So the SM is generating a signal while the Strategy window doesn't.

When I change the SM to load 10 years of data, I get the same results as the Strategy window, and also NO SIGNAL:

1
- ago
#5
Both the backtest and strategy monitor have same amount of data loaded.




The difference is - I am using a whole dataset of coins, instead of 1 symbol - which is SPY in your case. I assume you have "across entire portfolio" checked when limiting the open position count?

My goal is to have 4 positions maximum per each coin. I used optimizer to get preferred values for each coin, and some coins have a lot of entries but not a lot of exits, so limiting the amount of entries is key so they don't fill the entire portfolio up - for example, DEXEUSDT would suddenly be 90% of my porfolio, but by limiting it to 4 open positions, it can only be around 25%.

It is an issue that can be replicated:

1) Have a dataset of symbols, not just 1 symbol (on Binance preferably)
2) Multiple entires per coin
3) Buy at a certain condition, with "Number of open positions < X"
4) Run the strategy in strategy monitor in an intraday timeframe, send them to "quotes and price triggers",wait for it to do X amount of buys, see whether signals still get produced or not
0
Glitch8
 ( 13.87% )
- ago
#6
No I don’t have Across Portfolio checked. So far I’m not able to duplicate what you’re seeing. Can you share your Trading Preferences?
0
- ago
#7
I will do a video-record tomorrow since I can replicate it on a small scale.

Here is my "trading" preferences. I did not touch anything regarding "trading tresholds" as I automatically assumed that the "open positions" is linked to the whole account, not one coin in particular.

0
Glitch8
 ( 13.87% )
- ago
#8
OK, I see you have Live Positions set. This is why you're seeing the signal.

Live Positions works by erasing any existing open theoretical positions and injecting a SINGLE open position if your broker account holds one. Unfortunately, it's not able to maintain the granularity of the theoretical backtest because the broker just reports back one position.

It's explained in the Help.
1
Best Answer
- ago
#9
I see, that is understandable. I suppose I will use orphan position instead of tracking live positions. I assumed you were able to track that with signal blocks.

Thank you for the information!
0

Reply

Bookmark

Sort