Hi,
I'm developing a system with Daily bar resolution. Obviously, I have choices to enter trade either at current day Close or the following day Open, should there be a new trade entry signal triggered.
1. Enter at current day Close - With real time data feed, though the last price mark of chart keeps on updating but the trading system won't run thru during the trading hours. How can I force the trading system to run say, at 5 minutes before Close, so as to generate a new trade signal and get executed in time ?
2. Enter at the following day Open - With EOD data, the trade signal won't be visible till the data of the following day is updated. What shall I do to get the signal ?
Thanks.
How to use Daily chart to trade ? [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: How to use Daily chart to trade ?
There are multiple signal calculation modes in MultiCharts:
IOG On (tick by tick calculation)-order is generated on the current tick and sent on the next tick.
IOG Off (calculation on the close of the bar)-order is generated on the close of the current bar and sent on the opening tick of the next bar.
Next bar orders are sent to the broker upon next tick after the signal generation tick. That is possible to send Market and Price Next bar orders.
This Bar on Close order is sent on the close of the signal generation bar (disregard IOG settings). Only market orders can be sent This bar. Buy Next bar at open = Buy Next bar at Market.
With EOD data if you turn on the auto trading when the last bar is closed-the order would be sent to the broker only when the new bar is received.
IOG On (tick by tick calculation)-order is generated on the current tick and sent on the next tick.
IOG Off (calculation on the close of the bar)-order is generated on the close of the current bar and sent on the opening tick of the next bar.
Next bar orders are sent to the broker upon next tick after the signal generation tick. That is possible to send Market and Price Next bar orders.
This Bar on Close order is sent on the close of the signal generation bar (disregard IOG settings). Only market orders can be sent This bar. Buy Next bar at open = Buy Next bar at Market.
You need to run your code with IOG turned on, in the code specify the conditions and actions you need. You can recalculate the signal at certain time, generate an order at certain time, etc...1. How can I force the trading system to run say, at 5 minutes before Close, so as to generate a new trade signal and get executed in time ?
With EOD data if you turn on the auto trading when the current bar is open and the conditions for placing the order were met on the last closed bar-the order would be sent to the broker at once.2. Enter at the following day Open - With EOD data, the trade signal won't be visible till the data of the following day is updated. What shall I do to get the signal ?
With EOD data if you turn on the auto trading when the last bar is closed-the order would be sent to the broker only when the new bar is received.
Re: How to use Daily chart to trade ?
But how to code to re-calculate at say, 5 minutes before close , when it is a daily chart ?
Thanks.
Thanks.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: How to use Daily chart to trade ?
You are trading intraday, you have to add an intraday data series to your chart.But how to code to re-calculate at say, 5 minutes before close , when it is a daily chart ?
Thanks.
Reading material:
Getting Started with TS EasyLanguage
Multi-data strategy... pg. 34
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: How to use Daily chart to trade ?
Simple example of the logic will look like that:But how to code to re-calculate at say, 5 minutes before close , when it is a daily chart ?
Thanks.
Code: Select all
inputs:recalctime(0);
if currenttime=recalctime then once recalculate;
Re: How to use Daily chart to trade ?
I have a similar situation, and so I went into Quote Manager and created a custom session template to close at 15:55. Then, on my chart under instrument settings, I select this “Early Close” session. At 15:55 the strategy runs and generates the “at close” signal. Your trading system may continue to update the price, but for this chart the day is over.
- Attachments
-
- Session.jpg
- (57.5 KiB) Downloaded 539 times