Limit the Number of Position Hold, Remove Excess Signal

I have used the exrem(buy,sell) function to remove excess buy/sell signal
But there is still an excess buy signal
I wanna remove the excess buy signal by Limit the number of contract hold

is there any function word/code can check the account position hold before place order?

Many Thanks

Hello @benlai0117,

Based on what you've said, there appears to be a problem with the logic you've specified in your AFL (more signals that you want/expect), and as you haven't provided any code, we (the forum) can't really help you much further, other than to suggest you re-read the documentation.

Suggested reading in AB User Guide: positionsize (AB variable), "scaling", "exrem()", " Back-testing your trading ideas", " Portfolio-level back testing", "Pyramiding (scaling in/out) and mutliple currencies in the portfolio backtester", How to ask a good question

2 Likes

Thanks! Thanks!
Finally Solved