NexusFi: Find Your Edge


Home Menu

 





How to set up a daily stop loss?


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one xiaosi with 2 posts (0 thanks)
    2. looks_two sunsun with 2 posts (1 thanks)
    3. looks_3 Jura with 1 posts (0 thanks)
    4. looks_4 Virtuose1 with 1 posts (0 thanks)
    1. trending_up 4,155 views
    2. thumb_up 2 thanks given
    3. group 5 followers
    1. forum 7 posts
    2. attach_file 0 attachments




 
Search this Thread

How to set up a daily stop loss?

  #1 (permalink)
sunsun
hong kong
 
Posts: 6 since May 2013
Thanks Given: 1
Thanks Received: 1

Hi I'm having difficulties writing codes with Multicharts.
I am running data of over a few months and I am trying to set up a stop loss for the day.
Since the program is running continuously, I am trying to figure out how to reset the stop loss for the next day if I am stopped out today.
Is there a function in Multicharts that allows me to set up a daily stop loss?

Thanks a lot

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #2 (permalink)
 quantarb 
Wayne, NJ USA
 
Experience: Intermediate
Platform: Multicharts, Deltix DCS
Broker: Interactive Brokers/IQ Feed
Trading: ETF Options
Posts: 41 since Oct 2012
Thanks Given: 7
Thanks Received: 38

if Date <> Date[1] then
begin
//Enter Daily Stop Loss logic
end;

Reply With Quote
Thanked by:
  #3 (permalink)
sunsun
hong kong
 
Posts: 6 since May 2013
Thanks Given: 1
Thanks Received: 1


Thank you so much for the reply

Reply With Quote
  #4 (permalink)
 
xiaosi's Avatar
 xiaosi 
Brisbane, Queensland, Australia
Market Wizard
 
Experience: Advanced
Platform: JIGSAW/SIERRA CHART
Broker: MacQuarie Futures/AMP Clearing/CQG
Trading: HHI, HSI, FDAX
Posts: 502 since Feb 2012
Thanks Given: 448
Thanks Received: 535

Does anyone have or have seen code for NT for a daily stop? Something that would check the account equity of whatever account and make sure your not over your daily?

Spent hours searching one day, the gave up....this just reminded me....thanks!

Cheers,


XS

Follow me on Twitter Reply With Quote
  #5 (permalink)
 
Virtuose1's Avatar
 Virtuose1 
Montreal, Qc, Canada
 
Experience: Advanced
Platform: NinjaTrader 7
Broker: Interactive Brokers
Trading: ETF
Posts: 58 since Jun 2011
Thanks Given: 142
Thanks Received: 41

Here's the code for a daily stop in NinjaTrader in $:

if (Time[0].Date!=Time[1].Date)
{
sodEquity=Performance.AllTrades.TradesPerformance.Currency.CumProfit;
}


openEquity = Positions[1].GetProfitLoss(Closes[1][0],PerformanceUnit.Currency);
currEquity = Performance.AllTrades.TradesPerformance.Currency.CumProfit;

if((currEquity+openEquity)-sodEquity<=dailyStop)
Do something


I hope this help.

Reply With Quote
  #6 (permalink)
 
xiaosi's Avatar
 xiaosi 
Brisbane, Queensland, Australia
Market Wizard
 
Experience: Advanced
Platform: JIGSAW/SIERRA CHART
Broker: MacQuarie Futures/AMP Clearing/CQG
Trading: HHI, HSI, FDAX
Posts: 502 since Feb 2012
Thanks Given: 448
Thanks Received: 535


Virtuose1 View Post
Here's the code for a daily stop in NinjaTrader in $:

if (Time[0].Date!=Time[1].Date)
{
sodEquity=Performance.AllTrades.TradesPerformance.Currency.CumProfit;
}


openEquity = Positions[1].GetProfitLoss(Closes[1][0],PerformanceUnit.Currency);
currEquity = Performance.AllTrades.TradesPerformance.Currency.CumProfit;

if((currEquity+openEquity)-sodEquity<=dailyStop)
Do something


I hope this help.

Merci beaucoup!

Follow me on Twitter Reply With Quote
  #7 (permalink)
 
Morpheous2005's Avatar
 Morpheous2005 
London/UK
 
Experience: Intermediate
Platform: NT7
Broker: Continum
Trading: ES
Posts: 11 since Aug 2015
Thanks Given: 3
Thanks Received: 7

Hi, I am also looking to set up some sort of way to limit my max daily loss as I am just starting out and want to
find a way to help protect myself from aggressive over trading. Obviously it would be ideal if self discipline was enough
but that's in development and improving all the time. Can anyone explain what I would do with this code to implement it please ? Many thanks

Reply With Quote
  #8 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


Morpheous2005 View Post
Hi, I am also looking to set up some sort of way to limit my max daily loss as I am just starting out and want to
find a way to help protect myself from aggressive over trading. Obviously it would be ideal if self discipline was enough
but that's in development and improving all the time. Can anyone explain what I would do with this code to implement it please ? Many thanks

Not possible, sorry. Of course you can code an alert pop-up, sound alert, or something else when your daily loss has been reached. But if the problem is with self-discipline then you probably aren't that impressed with an alert or something else.

Reply With Quote




Last Updated on December 13, 2015


© 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