NexusFi: Find Your Edge


Home Menu

 





BarsSinceExit Question


Discussion in Traders Hideout

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




 
Search this Thread
  #1 (permalink)
 fxpipmeister 
Los Angleles, CA
 
Experience: Intermediate
Platform: Multicharts
Trading: Forex
Posts: 7 since Nov 2011
Thanks Given: 18
Thanks Received: 2

I don't understand how to use BarsSinceExit correctly.

For example when I use the expression:


1. if marketposition= 0 and BarsSinceExit (1) >= 0 then begin //works as intended

2. if marketposition= 0 and BarsSinceExit (1) >= 1 then begin //does not work as intended


Basically, I don't want my strategy to open and close positions on the same bar.

I want to limit entry and/or exit signals in this strategy to once per bar.

I checked the user manual and power language keyword reference but did not see anything obvious that would explain
why the strategy works using example #1 yet does not open new positions using example #2.
Would be great if someone could point me in the right direction.

Thanks,


Follow me on X Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Thursday May 28: GDP + Core PCE + Jobless Claims All at …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639


fxpipmeister,

assuming you use the code for all your entries and your signal hasn't taken an entry so far, trying to access previously closed positions values (BarsSinceExit in your case) will likely just return 0.
That's why you second approach could block all entries.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:




Last Updated on May 7, 2017


© 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