NexusFi: Find Your Edge


Home Menu

 





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


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
MasterYan
San Francisco, CA
 
Posts: 30 since Jul 2016
Thanks Given: 13
Thanks Received: 4

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 NexusFi?
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
Iran War Prediction Markets: Ceasefire 16%, Ground Invas …
Prediction Markets & Event Contracts
Q1 2026 Shatters All Derivatives Volume Records -- CME H …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
BERN ALGOS algo trading journal
8 thanks
  #2 (permalink)
 
ShadowFox's Avatar
 ShadowFox 
CO/USA
 
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
Posts: 129 since Jun 2020
Thanks Given: 70
Thanks Received: 159

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 NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 Anka Software   is a Vendor
 
Posts: 19 since Jan 2013
Thanks Given: 0
Thanks Received: 9


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
Thanked by:




Last Updated on July 30, 2021


© 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