HMUZ New Contract Decision script
Posted: 19 Jun 2011
I am not sure what changed but Interactive Brokers does not seem to notify me any more that the new futures contract has reached enough volume to surpass the old contract. Not only that I always found I was a day late anyway and if I tried to switch contracts mid day the back fill time is way too long. So I wrote a handy little script to help me never be late again. Here are the steps to using this script. (I have only used it once so these instructions may improve).
*Some time early in the new contract month execute this procedure:
*Follow the usual steps to get the New contract into the Quote Manager.
*The first night you do the nightly procedure give yourself extra time for the extra back fill.
Nightly Procedure:(I updated this procedure and there is a wordy explanation below)
*I am not sure actually but in TWS you may need to create a row with the new symbol.
*Copy/Paste your lowest resolution chart (in my case 10 second bars).
I will refer to this new chart as "the copy chart".
*Before you switch the copy chart to the new symbol reduce the number of bars to 1000.
This will allow it to backfill much quicker. You can increase it by 1000 each new day.
*Switch to the new symbol in the copy chart.
*You are going to leave this chart in place for a while so it is important to remove all studies.
Leaving it in place saves you some time each day.
*Apply the attached script to both charts each night (You will get a txt file for each symbol).
*So the original chart has all the studies and both charts have the HMUZ compare script.
*You will find the HMUZ compare decision script files in C:\ root
*Pull the txt documents up side by side and compare the numbers hour by hour.
When the new contract has higher volume:
*Obviously if the new contract has more volume switch over your charts and execution.
*If you are ever late again update your reminder system
I was going to write a map command change to merge the data and compare automatically but I have not gotten around to it. Maybe some day.
*Some time early in the new contract month execute this procedure:
*Follow the usual steps to get the New contract into the Quote Manager.
*The first night you do the nightly procedure give yourself extra time for the extra back fill.
Nightly Procedure:(I updated this procedure and there is a wordy explanation below)
*I am not sure actually but in TWS you may need to create a row with the new symbol.
*Copy/Paste your lowest resolution chart (in my case 10 second bars).
I will refer to this new chart as "the copy chart".
*Before you switch the copy chart to the new symbol reduce the number of bars to 1000.
This will allow it to backfill much quicker. You can increase it by 1000 each new day.
*Switch to the new symbol in the copy chart.
*You are going to leave this chart in place for a while so it is important to remove all studies.
Leaving it in place saves you some time each day.
*Apply the attached script to both charts each night (You will get a txt file for each symbol).
*So the original chart has all the studies and both charts have the HMUZ compare script.
*You will find the HMUZ compare decision script files in C:\ root
*Pull the txt documents up side by side and compare the numbers hour by hour.
When the new contract has higher volume:
*Obviously if the new contract has more volume switch over your charts and execution.
*If you are ever late again update your reminder system
I was going to write a map command change to merge the data and compare automatically but I have not gotten around to it. Maybe some day.