pausing after a loss - futures io
futures io futures trading

pausing after a loss

Discussion in NinjaTrader

    1. trending_up 711 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments

Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

Search this Thread

pausing after a loss

(login for full post details)
  #1 (permalink)
rio de janeiro, rj/brazil
Experience: Advanced
Platform: ninja trader, dukascopy
Trading: futures
Posts: 9 since Aug 2012
Thanks: 0 given, 0 received

I need to set some "pausing", blocking a strategy to generate any other for x minutes since last closing order (in case it was a loss), to improve my strategies performance.
So I need to store -> time_from_last_loss = toTime (when this event occurs) to check it against toTime (onBarUpdate()) to block or allow new trades.
But I am in trouble.
For instance, Does anyone know how can I store time_from_last_loss in case of a stop loss order?
Or maybe, there is some functionality on NT libraries.

Started this thread Reply With Quote

Journal Challenge February 2021 results (so far):
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(167 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(116 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(31 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
(login for full post details)
  #2 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Big Mike's Avatar
Posts: 49,753 since Jun 2009
Thanks: 32,299 given, 97,501 received

Look in the help guide for OnExecution()

You can easily access the DateTime for the last execution, and then determine if the execution was a winner or loser. If loser you can update a variable that stores the DateTime lastloser info.

As for new trades, you can just use the lastloser.AddSeconds() function (or similar) to test and see if sufficient time has passed before entering a new trade.

BTW, if you are using time based charts, there is also a built-in BarsSinceExit() function in NinjaTrader. But if using non-time based charts then it will only give you a bar number. You could also then pull the Time of that bar number.

Multiple ways to skin a cat in C#.


We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
(login for full post details)
  #3 (permalink)
rio de janeiro, rj/brazil
Experience: Advanced
Platform: ninja trader, dukascopy
Trading: futures
Posts: 9 since Aug 2012
Thanks: 0 given, 0 received

Interesting, that is what I need. Thank you!

Started this thread Reply With Quote

futures io Trading Community Platforms and Indicators NinjaTrader > pausing after a loss

Last Updated on March 7, 2013

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Journal Challenge w/$1500 prizes from Topstep!


Battlestations! Show us your trading desk - $1,500 in prizes!


Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only

Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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