NexusFi: Find Your Edge


Home Menu

 





EasyLanguage Barssinceexit Help


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,999 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?
What a Cool Draw/Markup Tool!
Traders Hideout
Anyone Trading Equities using NT8?
NinjaTrader
Has anyone taken The Mentor Program from The Trading Gam …
Trading Reviews and Vendors
Creating global variables for Ninjatrader
Traders Hideout
Server CPUs and Multicharts 14 or 15 limits
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
11 thanks
Just another trading journal: PA, Wyckoff & Trends
8 thanks
Want your NinjaTrader indicator created, free?
3 thanks
Knowledge Nuggets from the Web
2 thanks
Gradient Divergence Trading
2 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,441 since Apr 2013
Thanks Given: 491
Thanks Received: 1,634


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




Last Updated on November 7, 2018


© 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 - Sitemap - Downloads - Top
no new posts