BarsSinceEntryExecution isn't working. - NinjaTrader Programming | futures io social day trading
futures io futures trading


BarsSinceEntryExecution isn't working.
Updated: Views / Replies:1,727 / 51
Created: by alecsaccount Attachments:11

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 11  
 
Thread Tools Search this Thread
 

BarsSinceEntryExecution isn't working.

  #41 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,488 since Sep 2013
Thanks: 1,703 given, 3,691 received
Forum Reputation: Legendary


alecsaccount View Post
You mean only buy if current market position = flat? Because if I said only buy if no positions = flat, nothing would happen.

Anyway, that's the first thing I tried. Nothing. the problem must be that as soon as the fast SMA goes below the long one, it exits the position, and then it's flat again for a moment and buys again.

I'm not going to make it calculate on bar close.. No, that would make whatever I'm trying to do way less accurate. The strategy I'm building is actually a lot larger and more complex than this, I just didn't feel like the rest was relevant, so I didn't post it.

So how do I add a flag? Is that something I can do on the strategy builder, or would I have to open the chart and put a flag at each problem area..?

A flag is a variable, that you give a certain value, to avoid multiple entries, or re-entry on the same bar.
I never work with strategy builder, but i guess, especially if you are building something more complex you
will have to change code manually. Even more complex things i make them completely outside of NT.

Good luck in your effort

Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #42 (permalink)
Elite Member
San Diego, California
 
Futures Experience: Beginner
Platform: NinjaTrader 8
Favorite Futures: Emini ES, EUR/USD
 
Posts: 64 since Dec 2016
Thanks: 229 given, 12 received


rleplae View Post
A flag is a variable, that you give a certain value, to avoid multiple entries, or re-entry on the same bar.
I never work with strategy builder, but i guess, especially if you are building something more complex you
will have to change code manually. Even more complex things i make them completely outside of NT.

Good luck in your effort

Okay, but how do I make a flag? I kind of need to know this.

Assume I wasn't making something more complex.. Just tell me how to do it for the example I gave you.. Please.

Reply With Quote
 
  #43 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,488 since Sep 2013
Thanks: 1,703 given, 3,691 received
Forum Reputation: Legendary



alecsaccount View Post
Okay, but how do I make a flag? I kind of need to know this.

it could be various ways

1. boolean flag
when you put an order, you put the boolean to true
when the order is executed or cancelled you put it to false
this would solve multiple entries

2. last order bar
memorize the bar that triggered the last order, if the next
trigger is the same bar, simply void it and wait for at least
a different bar, this would solve repeat entries in the same
bar

Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #44 (permalink)
Elite Member
San Diego, California
 
Futures Experience: Beginner
Platform: NinjaTrader 8
Favorite Futures: Emini ES, EUR/USD
 
Posts: 64 since Dec 2016
Thanks: 229 given, 12 received

thanks so much for your help. this is pretty alien to me still, but I should be able to figure it out from here! (:

Why you would spend your time helping me is beyond me, but I am very grateful that you did.

Sent using the futures.io mobile app

Reply With Quote
 
  #45 (permalink)
Elite Member
San Diego, California
 
Futures Experience: Beginner
Platform: NinjaTrader 8
Favorite Futures: Emini ES, EUR/USD
 
Posts: 64 since Dec 2016
Thanks: 229 given, 12 received


rleplae View Post
it could be various ways

1. boolean flag
when you put an order, you put the boolean to true
when the order is executed or cancelled you put it to false
this would solve multiple entries

2. last order bar
memorize the bar that triggered the last order, if the next
trigger is the same bar, simply void it and wait for at least
a different bar, this would solve repeat entries in the same
bar

okay wait.. when you say "you put the boolean to true," how do I do that? I don't see "boolean" in the list of indicators. is this a piece of code I have to add the script, or an indicator I have to download off the internet..?

one again, I'm sorry for taking up your time. I know, I'm such a noob..

Sent using the futures.io mobile app

Reply With Quote
 
  #46 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,488 since Sep 2013
Thanks: 1,703 given, 3,691 received
Forum Reputation: Legendary


alecsaccount View Post
thanks so much for your help. this is pretty alien to me still, but I should be able to figure it out from here! (:

Why you would spend your time helping me is beyond me, but I am very grateful that you did.

Sent using the futures.io mobile app

A community can only work if once in a while you give back.

I learned a lot on futures.io and I found a few very instructive people, who helped me get to the level where i am
if they would not have "helped" me, i would not be where i am.

Good luck in your effort.

Reply With Quote
The following 2 users say Thank You to rleplae for this post:
 
  #47 (permalink)
Elite Member
San Diego, California
 
Futures Experience: Beginner
Platform: NinjaTrader 8
Favorite Futures: Emini ES, EUR/USD
 
Posts: 64 since Dec 2016
Thanks: 229 given, 12 received

okay, so just in case anyone who can help me is still here- I figured if the problem was that it was entering and exiting repeatedly as the bar ticks above and below the SMA.. then I could fix it by adding a condition to my entries;

if bars since exit execution > 15

and that would prevent it from entering again if it was ranging above and below the SMA.. but it didn't work.

WHY DIDN'T IT WORK???

Edit: I just realized it still plots entries and exits on the chart when I backtest, but the Summary is blank, and even though I have all the conditions set to 'plot on chart,' none of them are plotting on the chart. What is that about? Is this actually just a glitch?


Last edited by alecsaccount; March 15th, 2017 at 05:31 AM.
Reply With Quote
 
  #48 (permalink)
Elite Member
Milan, Italy
 
Futures Experience: Beginner
Platform: NinjaTrader, XTrader, TWS
Favorite Futures: ES, Stocks
 
Posts: 128 since Jan 2012
Thanks: 188 given, 57 received


alecsaccount View Post
Fuck, I knew that. Did I mention it's very, very late? Hold on.

@rleplae
@alecsaccount

Hello Gentlemen,
I was wondering if then you were able to end up with something useful regarding this issue of this interesting thread "BarsSinceEntryExecution isn't working".

I am very interested on this subject, because I tried to solve the very same issue. I also asked for NT support help and I exchanged several emails (sometime I could not really understand what they were saying) with them, but I could not end up with anything useful.

Then after a couple of weeks I noticed on this forum this great new thread of yours, but ... I do not see a conclusion. Did you perhaps end up with a practical solution to the issue of the subject.
If so please, kindly, could you let us all know?
Thank you very much for your precious time.
GT

cc. @ninja

Reply With Quote
 
  #49 (permalink)
Elite Member
San Diego, California
 
Futures Experience: Beginner
Platform: NinjaTrader 8
Favorite Futures: Emini ES, EUR/USD
 
Posts: 64 since Dec 2016
Thanks: 229 given, 12 received


guidoisot View Post
@rleplae
@alecsaccount

Hello Gentlemen,
I was wondering if then you were able to end up with something useful regarding this issue of this interesting thread "BarsSinceEntryExecution isn't working".

I am very interested on this subject, because I tried to solve the very same issue. I also asked for NT support help and I exchanged several emails (sometime I could not really understand what they were saying) with them, but I could not end up with anything useful.

Then after a couple of weeks I noticed on this forum this great new thread of yours, but ... I do not see a conclusion. Did you perhaps end up with a practical solution to the issue of the subject.
If so please, kindly, could you let us all know?
Thank you very much for your precious time.
GT

cc. @ninja

I never did end up figuring it out.. Did you, by chance?

Reply With Quote
 
  #50 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,488 since Sep 2013
Thanks: 1,703 given, 3,691 received
Forum Reputation: Legendary



alecsaccount View Post
Again, I'm not writing this with the ninjascript editor; I'm using the strategy builder because I have no experience coding whatsoever. So what you just wrote means very little to me.

I don't understand. I've only been running one time frame, one instrument, one data series, as far as I know.

Backtest type: Standard

Strategy: Long

Instrument: ES 12-16

Price based on: Last

Type: Minute

Value: 15

Start date: 01/01/2016

End date: 12/31/2016

Trading hours: <Use instrument settings>

Break at EOD: true

Include commission: false

Maximum bars lookback: Infinite

Bars required to trade: 20

Entries per direction: 1

Entry handling: All entries

Exit on session close: false

Set order quantity: Strategy

Time in force: GTC


I am afraid that without minimal coding (= edit source file and a Print statement),
you will not be able to solve this...

Reply With Quote

Reply



futures io > > > > > BarsSinceEntryExecution isn't working.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Housing's Dilemma: When Having a Buyer Isn't Enough Quick Summary News and Current Events 0 February 22nd, 2012 04:10 PM
Hell Isn't So Bad? kbit Jokes 0 November 6th, 2011 07:32 PM
What is going on here (my strategy isn't producing orders) ???? jmejedi NinjaTrader Programming 5 June 7th, 2011 08:11 PM
Austerity Isn't Working; It's Time for a Plan B Quick Summary News and Current Events 0 June 6th, 2011 07:40 AM
Money itself isn't lost or made,..... George Psychology and Money Management 8 October 25th, 2010 03:10 PM


All times are GMT -4. The time now is 07:22 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.14 seconds with 20 queries on phoenix via your IP 54.196.182.102