Cover Short positions near End of Trading Day
Author: gpiosenka
Creation Date: 7/2/2014 2:27 AM
profile picture

gpiosenka

#1
Hi, newbie here to use of Wealth Lab Pro so please excuse ignorance. I also am not a programmer any longer though I was 20 years ago.
I am running intra-day simulations of a strategy with1 minute bars. The strategy includes shorting. I notice leaving shorts uncovered at the end of the trading day can lead to serious losses the next day so I would like to ensure all short positions are covered prior to the end of the trading day no matter what the stock price is.
I have not been able to find a way to do that using the canned Conditions and Entry-Exit items available to build a strategy without programming. Is there a way to do that? If not what code would achieve that objective?
Thanks
profile picture

Eugene

#2
Welcome to the forums Gerald.

There's a way to achieve that objective by using conditions from the Community.Rules library:

* Intraday Rule: Time is later than HHmm
* Intraday Rule: Time is earlier than HHmm

The idea is to limit your Cover directive with a pair of these conditions. Community Rules is available for download to verified customers, so please create a support ticket for further instructions.

And also it's possible to reach with C# code if you follow suggestions in this Knowledge Base article:

Intraday / Multi-Time Frame | Keep from holding positions overnight
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).