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,164 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?
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Iran and Israel Stand Down: What $9M in Peace Contracts …
Prediction Markets & Event Contracts
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
World Cup Opens: USA at 45.5% Tonight as Markets Push Ba …
Prediction Markets & Event Contracts
 
  #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