NexusFi: Find Your Edge


Home Menu

 





Multicharts.Net order handling help needed


Discussion in MultiCharts

Updated
    1. trending_up 3,582 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 12 posts
    2. attach_file 1 attachments




 
 

Multicharts.Net order handling help needed

 
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Yes, Multicharts can handle multiple entries into a position, regardless of the order type used.

Regards,

ABCTG

Follow me on Twitter

Can you help answer these questions
from other members on NexusFi?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
 
 MarcOne 
Milan, Italy
 
Experience: Intermediate
Platform: Ninja
Trading: 6E, CL, GC
Posts: 9 since Oct 2011
Thanks Given: 5
Thanks Received: 0

Hi ABCTG!
My troubles are the following:

I declare my 2 orders with the following code:
private IOrderPriced m_entryShort_SellOrder;
private IOrderPriced m_exitStop_BuyOrder;

in the "Create()" method I set the type of order:
m_entryShort_SellOrder = OrderCreator.Stop(new
SOrderParameters(Contracts.UserSpecified, "EntryShort",
EOrderAction.SellShort));
m_exitStop_BuyOrder = OrderCreator.Stop(new
SOrderParameters(Contracts.UserSpecified, "SStopOrder",
EOrderAction.BuyToCover));

when the condiction is verificated, I send orders with this mode:
m_entryShort_SellOrder.Send(m_OrderShortPrice, m_NumOrder);

where "(double) m_OrderShortPrice" is the price, "(int) m_NumOrder" is the number of lots (default: 1), and every candle I re-insert order with:
m_entryShort_SellOrder.Send(m_OrderShortPrice, m_NumOrder);

I noticed that the order wants to be re-inserted every candle, it's right?.

Now I want that the strategy to handle multiple simultaneous orders. Every order is made of a single contract and every position has its own target and stop. So these are the questions:

Q1. is there a solution to read/get a value Order_ID for the order that I send into MC ?

Q2. is there a method or a variable that I can get in order to read the status of every single order? (ie. order flat, order in place, order close by target, order close by stop,ect.)? If yes, can you explain me, with some source code for examples? If not comes the Q3:

Q3. Example: I made 4 orders, 2 are still in position and 2 are already closed, may I discriminate which order is closed to the target/stop, in order to continue to re-insert target/stop for the others that are still opened? Does MC give this chance?







ABCTG View Post
Yes, Multicharts can handle multiple entries into a position, regardless of the order type used.

Regards,

ABCTG


Started this thread
 
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


MarcOne,

please follow what I wrote above when you want others to take a look at the code problems. The code should be complete and should verify, as the snippets might not show the problem. You don't have to reveal your logic of course, as you can change your logic with something else - so long the problems persist in this new demo code.

For your questions, the orders have a property for the ID and you could subscribe to the TradeManager, which might give you the other information you are looking for (but it might be more complex). There are examples for that in the official MC forum.
You can also check the order names and prices for each trade your signal made, this should give you access to which orders were filled, too.
I am sure there are examples for that in the forum, but the programming guide covers all you need:
https://www.multicharts.com/downloads/MultiCharts.NET-ProgrammingGuide-v1.1.pdf

Regards,

ABCTG


ABCTG View Post
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.


Follow me on Twitter

 



Last Updated on January 26, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts