NexusFi: Find Your Edge


Home Menu

 





EasyLanguage Barssinceexit Help


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
jessehhhh
Montclair
 
Posts: 17 since Nov 2018
Thanks Given: 0
Thanks Received: 0

I am having trouble with a BarsSinceExit clause in my buy strategy.

My sell strategy uses an intrabarordergeneration setting for profit target. When it hits this profit I dont want my strategy to buy off of the bar that signaled a sell order for my ProfitTarget.

when I use the code BarsSinceEntry>1 or TotalTrades<1 in my buy strategy it only returns 1 buy for the day and isn't calculating based off of the bars since entry.

Is there a workaround for this?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
Prediction Markets & Event Contracts
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Expiration Day: Wall Street Rallies on Peace Hopes While …
Prediction Markets & Event Contracts
SEC and CFTC Unlock Customer Cross-Margining for Treasur …
Treasury Notes and Bonds
The Ceasefire Curve: 2pct Peace by Next Week, 60pct by S …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639


jessehhhh,

your code for BarsSinceEntry doesn't specify the position that you want to look at it.

 
Code
BarsSinceEntry(Num) 

Where Num is a whole number (up to a maximum 10) representing positions ago.
If you don't specify a value for Num, the current position will be used. This will however result in a value of 0 for BarsSinceEntry when you are flat. It appears what you are looking for is the BarsSinceEntry value for the previously closed position.

Regards,

ABCTG


Follow me on X Reply With Quote




Last Updated on November 7, 2018


© 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