Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Good morning to everone, this is my first post so I hope to be in right place..
I've lot of troubles in understanding orders handling in MC .Net.. I seached a lot for infos but at the end I'm still in confusionary state. I know there are managed and unmanaged orders and orders for backtests and other for RT..
Someone of you can please help me in understanding what are the right codes to give?
I compiled a simple breackout strategy (my first one) to test orders.
My need is to have one order long and one short, OCO, but I can't submit them every candle, they must stay till I cancel or move them.. When in position (i.e. long) I need to cancel the remaining short order and send stop and target order.. I know it should be simple, but, while for NT I had no problem, with MC I'm in big trouble.. Here some infos:
Strategy order init:
[AllowSendOrdersAlways(true), IOGMode(IOGMode.Disabled), SameAsSymbol(true)]
I put orders (m_entryLong_BuyOrder, m_entryShort_SellOrder)but they’re cancelled every new bar..
Any help would be gratly appreciated..
Thanks in advance!
Can you help answer these questions from other members on NexusFi?
I would suggest to start with the managed approach, which is what you did already anyway.
Most of the time you send an order in Multicharts when a certain condition is true. Multicharts will keep this order alive as long as this condition is valid (or until you get filled). This way you can control how long orders stay alive by simply making sure the condition for the order stays valid as long as you want.
Thanks ABCTG, I was wondering how was the approach of MC in managed orders handling..
Maybe useful for other people to know my noob exp using managed approach.
My troubles were born when I've read here in post #11 that the orders must be resubmitted every candle (or tick if using IOG mode=on). It was just a question of misunderstanding..
What MC does is, as you write, simply to keep order alive. This means, from broker side, that no change take place.. no change in priority, no change in broker order ID.. Nothing happens to your order!
Basically I can say that MC simply validate the existing order inside itself. If, for some reason, the order is no longer valid, MC cancel it. It can also be considered a security improvement, from my point of view.
Now I’ll continue my tests, testing all types of orders..
If I’m right, the managed order should work both for BT and RT mode.. (Of couse there will be differencies, I just hope not so big)
Is there something I should know before in placing take profit/stop orders? This article gave me the idea in how they should work, but any help is greatly appreciated. Thanks again
Does exist ( and if yes how is it called ) a flag that I can insert into the code to verify if the strategy is activated or not? I mean, is SA activated returns true, if SA not active returns false?
Thanks in advance!!
Thanks a lot ABCTG, I solved this issue, but now I'm facing another one.. hope you can help me again, without abusing of your kindness..
This is my trouble:
I'm not able to put (and follow) multiple limit orders. I built a breakout strategy. I made a strategy only for long entries and a strategy with only shorts. I'm using limit orders (no market executions). Everything is working fine with one entry. Now I'd like to use multiple entries using limits orders. No way.. the new limit order (if I'm already in position) is not handled at all. I can only wait till the strategy is flat. On the other I'm able to send market orders..
What is the logic of Multicharts? May I get an unic order Id to handle like in Ninjatrader?
I'm confused.. Do you have any suggestion?
what settings are you using under the Properties in the "Strategy Properties" tab for "Position Limits"? By default
MC will only allow one entry in the same direction, so not allowing more than one would block all further entry orders (until you are flat again).
Thanks for your response, I've to say that I tried all the options, and I can't get the solution..
I'm surely wrong in something I can't understand.. 7I attach the current settings, maybe you can give some hint.
Thanks Again
it's hard to tell from that screenshot as the settings appear correct. Is there enough capital left for allowing additional entries and does the first entry use less than 5 contracts?
You could post your code so others can take a look at it and point you in the right direction. This doesn't mean you have to reveal your actual entry logic, as you can replace it with something else - so long the code still verifies and demonstrates the same behavior.
Well I'm in simulated mode so the capital left is ok (100.000 $), every entry is 1 contract.
I'll post the code as soon as I arrive in office (tomorrow). But just let me understand if MC handle multiple entries like the one I need ( using limit multiple orders while I'm already in position)..
Thanks Again!