Let say if we use if (bars.time[0].month!=bars.time[1].month) then we only get to buy at start of next month.
If we use if (bars.time[0].month!=bars.time[1].month) we can only buy at start of next month because OrderCreator.MarketThisBar cannot be used.
Is there any simple way to buy at the end of the month?
-
- Posts: 83
- Joined: 18 Mar 2013
- Has thanked: 11 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Is there any simple way to buy at the end of the month?
Hello maisatomai,
You can access the calendar and instrument sessions in order to generate an order N minutes before session close on the last day of the month.
You can access the calendar and instrument sessions in order to generate an order N minutes before session close on the last day of the month.