I've written a new strategy and a new position sizer which uses monthly bars. To open and close positions I've used "BuyAtMarket(bar+1, "Entry")" and "SellAtMarket(bar+1, Position.AllPositions, "Exit")". The trades execute at the correct price (which is the opening price on the first trading day of the next month), but on the "Trades" tab, the entry dates and exit dates show the last day of the month bar+1 rather than the date on which the trade actually occurred (the first day of the month bar+1). How can I correct this?
Size:
Color:
It's not broken, as Wealth-Lab always assumes end-of-bar labeling. Consequently, both on the chart and on the Trades tab, a month is timestamped with the last day of the month.
Size:
Color:
Thanks Eugene. I realize this isn't broken but since the trades were actually made on the first day of the month (at the open of the monthly bar) the dates shown as "enrty date" and "exit date" on the Trades screen are rather misleading. Is there any way, perhaps by changing from monthly time frame to daily and then back to monthly, that I might get this reflected more accurately? Perhaps I might need to write new code for the generation of the Trades screen.
Size:
Color: