SETEXITONCLOSE in auto trading
Posted: 27 Aug 2008
The SETEXITONCLOSE cannot close all the open positions before the market close in auto trading. How to use the SETEXITONCLOSE in Auto Trading?
MultiCharts
https://www.multicharts.com/discussion/
https://www.multicharts.com/discussion/viewtopic.php?f=5&t=5500
You can use time based condition to exit something like:The SETEXITONCLOSE cannot close all the open positions before the market close in auto trading. How to use the SETEXITONCLOSE in Auto Trading?
Code: Select all
Input: MyTime(1528);
If time >= MyTime then begin
Sell ("_LX_") Next Bar at Market;
BuytoCover("_SX_") Next Bar at Market;
end;
The code reads computer time so it should not matter, however you have to remeber what Khalaad suggested.Super,
Your code is correct but I should use 1 min or 5 min bar to run the system. If I use 30 min bar or 15 min bar, the system will exit 30 min or 15 min before the market close. The exit price and the real market close may have a big difference.
Here's link to the code you are looking for.Super,
Where is the code?
hi,Here's link to the code you are looking for.Super,
Where is the code?
https://www.TS.com/Discussion ... xactMatch=
Regards
Super
Here's it.hi,Here's link to the code you are looking for.Super,
Where is the code?
https://www.TS.com/Discussion ... xactMatch=
Regards
Super
some of us don't have access to TS forum,
could you kindly paste the code here ?
thanks appreciate it.