How to create a delay for a few days after negative trade? - futures io
futures io

How to create a delay for a few days after negative trade?

Discussion in EasyLanguage Programming

    1. trending_up 2,524 views
    2. thumb_up 1 thanks given
    3. group 3 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 150,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

How to create a delay for a few days after negative trade?

(login for full post details)
  #1 (permalink)
San Francisco, CA
Posts: 29 since Jul 2016
Thanks: 13 given, 4 received

I'm just starting to code on EasyLanguage and I can't figure out how to write code like this:

If the last trade was negative then don't do any trades for 5 days (or for 50 bars).


Reply With Quote

Can you help answer these questions
from other members on futures io?
How do I create Strategy with the Second Entry indicator
Market on Close data within IB
Platforms and Indicators
Multi Time Frame High/Low/Median levels
help with take profit several targets
NT8 Order Management Strategy
The Elite Circle
(login for full post details)
  #2 (permalink)
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
ShadowFox's Avatar
Posts: 116 since Jun 2020
Thanks: 69 given, 156 received

Might be able to use the NetProfit call. I haven't done this to reduce trading but I have used it for scaling and compounding within a strategy. There is also OpenPositionProfit. The NetProfit does not include current position until it's closed I am pretty sure.

Possibly something like an if statement with NetProfit < NetProfit[1] to then set a bartimer. Could call currentbar + 5 then set entry parameters on that. Or just a countdown.

I really don't recommend this though. From my experience, my best trades are typically just after my worst trades. It would be better to find out why those market conditions might be bad to trade for a few days and limit through an indicator. Let the market tell you when to trade rather than an arbitrary timer.

If you cannot identify then you cannot filter it and that's okay. Edges don't tell you when a trade is going to work. Edges only tell you that you should be profitable over a larger set of trades. The key is to trade every single one though, unless you have data to suggest you shouldn't.

Visit my futures io Trade Journal Reply With Quote
(login for full post details)
  #3 (permalink)
 Anka Software   is a Vendor
Posts: 19 since Jan 2013
Thanks: 0 given, 9 received

PositionProfit <- will give the last position profit
BarsSinceEntry <- will give number of bars since entry

You can use the above two EL functions to delay the next trade.

Reply With Quote
The following user says Thank You to Anka Software for this post:

futures io Trading Community Platforms and Indicators EasyLanguage Programming > How to create a delay for a few days after negative trade?

Last Updated on July 30, 2021

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, 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.
no new posts