NexusFi: Find Your Edge


Home Menu

 





MultiCharts.NET: How to set stop loss in order ?


Discussion in MultiCharts

Updated
    1. trending_up 1,985 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 7 posts
    2. attach_file 0 attachments




 
Search this Thread

MultiCharts.NET: How to set stop loss in order ?

  #1 (permalink)
JohnJo
Mexico city
 
Posts: 15 since May 2019
Thanks Given: 4
Thanks Received: 0

Hi all,

I'm developing a Signal (Multicharts.net), that issues Buy and Sell orders. In addition I want to set the stop loss when the order is created. But I cannot find a parameter in the OrderCreator class to set it.

Example:

buy_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.CreateUserSpecified(PositionSize), "Long Trade", EOrderAction.Buy));

Can someone help ? Thanks.
JohnJo.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
46 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

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

JohnJo,

there are multiple ways to accomplish this. One could be by issuing a stop order yourself:
https://www.multicharts.com/trading-software/index.php/4.6.1_Orders
You can also issue stops using using a built-in exit, but using a separate stop order might give you more control.
Take a look at the Stop_Loss signal for an example for how to issue stops using GenerateStopLoss.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
JohnJo
Mexico city
 
Posts: 15 since May 2019
Thanks Given: 4
Thanks Received: 0


Thanks for the suggestion. I've tested the "Stop_Loss" signal yesterday, but it does not generate a "hard" stop on the chart.

I'm looking for a signal that once or after the position is opened, creates the SL level on the chart.

If there are no examples, guess I'm gonna have to code a new one using:

stopLossLong = OrderCreator.Stop(new SOrderParameters(Contracts.CreateUserSpecified(PositionSize), EOrderAction.Sell));

stopLossShort = OrderCreator.Stop(new SOrderParameters(Contracts.CreateUserSpecified(PositionSize), EOrderAction.BuyToCover));

Do I need to specify the " OrderExit.FromAll " parameter ? Or it automatically closes all the contracts ?

Thanks again,
JohnJo.

Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

JohnJo,

can you show an example of "a "hard" stop on the chart" as in general there shouldn't be a difference in how Multicharts displays the orders via GenerateStopLoss or an individual stop order?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #5 (permalink)
JohnJo
Mexico city
 
Posts: 15 since May 2019
Thanks Given: 4
Thanks Received: 0

Sorry I was not clear with the "hard" stop comment.

What I mean is: on the chart, I cannot see the stop loss created. Stop_Loss signal is attached properly, the order is created manually but the SL is not showing on the chart.

I've been thinking about another option:
-set the "Exit strategies" with option "Auto Attach as Exit Order",

but not sure if when a Signal creates the order, will the "Exit strategies" be automatically attached ?

JohnJo.

Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

JohnJo,

it sounds like either the stop wasn't triggered yet or in case it was real time the chart trading wasn't enabled, which in turn would not show the orders on the chart.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #7 (permalink)
JohnJo
Mexico city
 
Posts: 15 since May 2019
Thanks Given: 4
Thanks Received: 0

Could it be because the parameter IOGMode is disabled ?

[IOGMode(IOGMode.Disabled)]

(does not generate intra-bar orders)

Reply With Quote
  #8 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

JohnJo,

if you don't use the built-in GenerateStopLoss within conditional statements the stop will be in place directly after the entry by design even with IOG disabled.
I am afraid without seeing the code and inputs you used and the situations (screenshots) where the stop should have been in place one could only speculate about the cause here.

Regards,

ABCTG


JohnJo View Post
Could it be because the parameter IOGMode is disabled ?

[IOGMode(IOGMode.Disabled)]

(does not generate intra-bar orders)


Follow me on Twitter Reply With Quote





Last Updated on June 21, 2019


© 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