NexusFi: Find Your Edge


Home Menu

 





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


Discussion in MultiCharts

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




 
Search this Thread
  #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?
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
Iran Deal "In Review" at 87% on Deadline Day - …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
The Backwardation Signal: How the CL Futures Curve Tells …
Commodities
The June 15 Resolution Trap: Irans Agreed Text Still Pri …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X 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,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X 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,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X 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,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X Reply With Quote




Last Updated on June 21, 2019


© 2026 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 - Downloads - Top
no new posts