Daily Loss Limit - NinjaTrader Programming | futures io social trading
futures io futures trading


Daily Loss Limit
Updated: Views / Replies:4,133 / 11
Created: by togier 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
 

Daily Loss Limit

  #11 (permalink)
Elite Member
Calgary, Alberta
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: Kinetick
Favorite Futures: ES
 
JonnyBoy's Avatar
 
Posts: 937 since Apr 2012
Thanks: 377 given, 1,833 received


GeeBee View Post
Is there any indicator for Daily Loss and Profit limit. I don't know how to make one. Thanks

Yes. It is called your butt, which you use to sit on your hands.

I am not sure what you mean by 'indicator'. To do what? Stop you from trading once your reach a predefined profit or loss?

--------------------------------------------------------
- Trade what you see. Invest in what you believe -
--------------------------------------------------------
Reply With Quote
 
  #12 (permalink)
Elite Member
Ath. Gr.
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, 6E
 
Posts: 29 since Nov 2016
Thanks: 20 given, 11 received


drolles View Post
Would a solution be to search the trade collection for trades that occurred that day, then add the current PnL?

 
Code
if (dailyPnL > -(maxLoss))
                    {

                        if (Performance.AllTrades.Count != tradeCount)
                        {
                            tradeCount = Performance.AllTrades.Count;

                            foreach (Trade x in Performance.AllTrades)
                            {
                                if (x.Exit.Time.Date.CompareTo(Time[0].Date) == 0)
                                {
                                    dailyPnL += x.ProfitCurrency;

                                }

                            }

                        }

                        if (Position.MarketPosition != MarketPosition.Flat)
                        {

                            dailyPnL += Position.GetProfitLoss(Close[0], PerformanceUnit.Currency);

                        }

                    }
You would obviously need to reset the dailyPnL each day.

 
Code
if (Bars.FirstBarOfSession && FirstTickOfBar)
                    {

                        dailyPnL = 0;}
It when then work regardless if you are in backtest or live trading. You would always be searching the trade collection based on the current day. Of course, please feel to poke holes in my logic

This is smart ! Thanks.

Reply With Quote

Reply



futures io > > > > > Daily Loss Limit

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May
 

EasyLanguage ABC's: Mastering TradeStation Programming w/Chris Kaiser

Elite only
 

Prototyping Python Strategies (part 2: Backtesting) w/Ran Aroussi [special time: 1PM ET]

Elite only
 

Portfolio Diversification w/Brendon Delate @ Diversify Portfolio

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
EasyLanguage Daily Profit and Daily Loss limit in strategy Big Mike EasyLanguage Programming 11 May 12th, 2016 01:50 PM
When a stop loss order is filled beyond limit price Big Mike Brokers and Data Feeds 56 September 15th, 2015 09:01 AM
Daily Loss Limit sleepy Brokers and Data Feeds 18 August 20th, 2014 02:53 PM
How to set up a Stop (Limit) Loss order - Ninja Trader jdumanic NinjaTrader 2 June 7th, 2011 05:40 PM
The First Loss is the Best Loss ZTR Psychology and Money Management 21 May 28th, 2010 05:18 PM


All times are GMT -4. The time now is 11:21 PM.

Copyright © 2017 by futures io, s.a. Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@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 2017-05-22 in 0.07 seconds with 23 queries on phoenix via your IP 54.224.200.104