Hi Everybody,
I have problem for programming MC.
When I want to close all orders when the last bar is reached.
Especially when a half day case occurs!
It made me trouble when a half day case occurs! It makes trouble for backtesting! Because computer don't know when would be the last bar appears!
How can I do? I am a newbie of MC. Thank you for all!
How to program "Close all orders when end of day" [SOLVED]
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to program "Close all orders when end of day"
look up SetExitOnClose.Hi Everybody,
I have problem for programming MC.
When I want to close all orders when the last bar is reached.
ps.
It is for backtesting only.
For real life trading, you have to code an exit strategy. (eg. exit 3 minutes before close)
Sorry, our computers are not the ALL intelligent being yet. The computer cannot read your mind; the only way the computer knows it is a half day is if you tell it so.Especially when a half day case occurs!
It made me trouble when a half day case occurs! It makes trouble for backtesting! Because computer don't know when would be the last bar appears!
How can I do? I am a newbie of MC. Thank you for all!
Re: How to program "Close all orders when end of day" [SOLVED]
Wow!
You are supra fast!
Thank you for your help! I would try it!
You are supra fast!
Thank you for your help! I would try it!
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to program "Close all orders when end of day"
see also post #7Wow!
You are supra fast!
Thank you for your help! I would try it!
viewtopic.php?f=16&t=6929
Re: How to program "Close all orders when end of day"
goose Eod_Exit code with an EarlyClose function for the US markets.
- Attachments
-
- EOD_EXIT_2.ELD
- (16.27 KiB) Downloaded 434 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to program "Close all orders when end of day"
any difference with this code?goose Eod_Exit code with an EarlyClose function for the US markets.
viewtopic.php?f=5&t=7834&p=33125&hilit=eod_exit#p33125
Re: How to program "Close all orders when end of day"
TJ,
the code Super posted is the older one from 2005 . The one above is the newer one from 2009. I didnt compare in detail what goose changed except that he deleted the GVSetNamedInt section.
the code Super posted is the older one from 2005 . The one above is the newer one from 2009. I didnt compare in detail what goose changed except that he deleted the GVSetNamedInt section.