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

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > MultiCharts


Multicharts.Net order handling help needed
Started:November 9th, 2016 (12:30 PM) by MarcOne Views / Replies:99 / 4
Last Reply:November 16th, 2016 (11:58 AM) Attachments:0

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
 
Thread Tools Search this Thread

Multicharts.Net order handling help needed

Old November 9th, 2016, 12:30 PM   #1 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 5 since Oct 2011
Thanks: 3 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
     

Old November 10th, 2016, 06:27 AM   #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,151 since Apr 2013
Thanks: 191 given, 648 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:
     

Old November 10th, 2016, 10:35 AM   #3 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 5 since Oct 2011
Thanks: 3 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
     

Old November 16th, 2016, 11:52 AM   #4 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: 6E, CL, GC
 
Posts: 5 since Oct 2011
Thanks: 3 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
     

Old November 16th, 2016, 11:58 AM   #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,151 since Apr 2013
Thanks: 191 given, 648 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:
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > MultiCharts > 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)
 

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13

Normal webinar schedule resumes after the holidays

January
     

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 06:02 PM.

Copyright © 2016 by futures.io. All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
 
no new posts
Page generated 2016-12-08 in 0.09 seconds with 19 queries on phoenix via your IP 54.159.129.152