NexusFi: Find Your Edge


Home Menu

 





BarsSinceExit Question


Discussion in Traders Hideout

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




 
Search this Thread

BarsSinceExit Question

  #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 Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
43 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,435 since Apr 2013
Thanks Given: 482
Thanks Received: 1,628


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 Twitter Reply With Quote
Thanked by:




Last Updated on May 7, 2017


© 2024 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 - Privacy Policy - Downloads - Top
no new posts