Multicharts.Net order handling help needed - MultiCharts | futures.io
futures io futures trading


Multicharts.Net order handling help needed
Started: by MarcOne Views / Replies:296 / 12
Last Reply: Attachments:1

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 1  
 
Thread Tools Search this Thread
 

Multicharts.Net order handling help needed

  #1 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 9 since Oct 2011
Thanks: 5 given, 0 received

Multicharts.Net order handling help needed

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)]

Order init:
m_entryLong_BuyOrder = OrderCreator.Stop(new SOrderParameters(Contracts.UserSpecified, "EntryLong", EOrderAction.Buy));
m_exitMarket_SellOrder = OrderCreator.MarketThisBar(new SOrderParameters(Contracts.UserSpecified, "ExitLMStop", EOrderAction.Sell));
m_exitStop_SellOrder = OrderCreator.Stop(new SOrderParameters(Contracts.UserSpecified, "LStopOrder", EOrderAction.Sell));

m_entryShort_SellOrder = OrderCreator.Stop(new SOrderParameters(Contracts.UserSpecified, "EntryShort", EOrderAction.SellShort));
m_exitStop_BuyOrder = OrderCreator.Stop(new SOrderParameters(Contracts.UserSpecified, "SStopOrder", EOrderAction.BuyToCover));
m_exitMarket_BuyOrder = OrderCreator.MarketThisBar(new SOrderParameters(Contracts.UserSpecified, "ExitSMStop", EOrderAction.BuyToCover));

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!

Reply With Quote
 
  #2 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received

MarcOne,

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.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #3 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 9 since Oct 2011
Thanks: 5 given, 0 received


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.

Iíve to thank also Jura for this article, very useful for me.

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

Reply With Quote
 
  #4 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 9 since Oct 2011
Thanks: 5 given, 0 received

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!!

Reply With Quote
 
  #5 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received

Futures Edge on FIO
Yes, something like that exists. You can access it via the Environment property. In your case you are looking for Environment.IsAutoTradingMode.

Regards,

ABCTG



MarcOne View Post
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!!


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #6 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 9 since Oct 2011
Thanks: 5 given, 0 received

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?

Thanks a lot in advance..



ABCTG View Post
Yes, something like that exists. You can access it via the Environment property. In your case you are looking for Environment.IsAutoTradingMode.

Regards,

ABCTG


Reply With Quote
 
  #7 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received

MarcOne,

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).

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #8 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 9 since Oct 2011
Thanks: 5 given, 0 received

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
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).




ABCTG View Post
MarcOne,

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 artried e flat again).

Regards,

ABCTG


Reply With Quote
 
  #9 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received

MarcOne,

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.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #10 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 9 since Oct 2011
Thanks: 5 given, 0 received


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!



ABCTG View Post
MarcOne,

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.

Regards,

ABCTG


Reply With Quote

Reply



futures io > > > > Multicharts.Net order handling help needed

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

NinjaTrader 8: Tips and Tricks (part 2)

Mar 2
 

An Afternoon With FIO member @michaelleemoore

Elite only
 

Jigsaw Trading: Keys to successfully trading the open

Mar 9

Macro view: Trump Market Risk w/Piers Curran @ Amplify Trading

Elite only

Reading the Psychology of the Market w/Brett Steenbarger & Trading Technologies

Elite only

Hybrid Machine Learning (R and TradeStation) w/Murray Ruggiero

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
First automated order handling system TahuPhoenix EasyLanguage Programming 1 April 14th, 2015 05:38 AM
In Multicharts.Net how do you send an order for a symbol that is not charted? JHall65 MultiCharts 1 August 30th, 2014 08:10 AM
Order Handling to reduce Slippage sburtt NinjaTrader Programming 2 October 7th, 2013 08:11 AM
Strategy code assist needed for handling positions sburtt NinjaTrader Programming 10 November 13th, 2012 06:30 PM
Server side order handling nanobiotech Traders Hideout 17 December 11th, 2010 06:12 AM


All times are GMT -4. The time now is 03:11 PM.

no new posts
Page generated 2017-02-26 in 0.14 seconds with 20 queries on phoenix via your IP 54.204.130.94