I've received a few warnings from my broker about my placing and cancelling orders. The report they sent said that I attempted over 2000 orders in just a few minutes which is completely unlike anything that I actually do.
Digging a little deeper, it looks like the fault falls on me using setstoploss and setprofittarget. Once the session ends, the strategies keep attempting to apply PTs and SLs onto my open position(s). After a random amount of time, this activity stops, but not before placing and rejecting thousands of orders.
These orders should stop being placed the second that the session ends.
MC 8.8.9589 64bit
Rithmic
EDIT:
I just saw that 9.0 beta 2 added an option to turn off the strategy after X amount of rejected orders. Very handy feature. Does this turn SA/AA off?
I'd still like to see the PT and SL orders function correctly...
PT and SL Attempts after the end of session
PT and SL Attempts after the end of session
- Attachments
-
- after_session_end_orders.png
- (24.93 KiB) Downloaded 614 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: PT and SL Attempts after the end of session
No, if you read what it does you would not want to do thatNo sir. Do you suggest that I wrap my PT and SL code with it or the entire piece of executing code?
Please send me the workspace and code you are using. Do you have it replicated each day?
Re: PT and SL Attempts after the end of session
I guess I should have read your link.
The PT and SL code is simple:
My window & instrument is formatted to the end of the session.
No IOG
Yes, this is an every day thing.
The PT and SL code is simple:
Code: Select all
Inputs:
Profit( 0 ),
StopLoss( 0 ) ;
Setstopcontract ;
if Profit > 0 then
setprofittarget( Profit ) ;
if StopLoss > 0 then
setstoploss( StopLoss ) ;
No IOG
Yes, this is an every day thing.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: PT and SL Attempts after the end of session
MultiCharts will continuously try to apply the PTs and SLs if there is an open position. It will attempt to do that after each order reject.Digging a little deeper, it looks like the fault falls on me using setstoploss and setprofittarget. Once the session ends, the strategies keep attempting to apply PTs and SLs onto my open position(s). After a random amount of time, this activity stops, but not before placing and rejecting thousands of orders.
These orders will stop being placed if they are active at broker (not rejected by the broker).These orders should stop being placed the second that the session ends.
Yes, it turns off the AT after the specified amount of rejects. In MC 8.8 it can be configured in the registry editor.I just saw that 9.0 beta 2 added an option to turn off the strategy after X amount of rejected orders. Very handy feature. Does this turn SA/AA off?
In HKEY_CURRENT_USER\Software\TS Support\MultiCharts64\TraderServer create ATRejectsLimit:DWORD Value and set the amount of rejects acceptable for you.