NexusFi: Find Your Edge


Home Menu

 





BarsSinceEntryExecution isn't working.


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one alecsaccount with 29 posts (0 thanks)
    2. looks_two rleplae with 20 posts (19 thanks)
    3. looks_3 gisot with 3 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 15,472 views
    2. thumb_up 19 thanks given
    3. group 3 followers
    1. forum 52 posts
    2. attach_file 11 attachments




 
Search this Thread

BarsSinceEntryExecution isn't working.

  #31 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13


rleplae View Post
1. you better load a few more days to be sure

2. you will see the chart, when you actually launch the replayer
and click play forward, the player allows you to accelerate it
then the chart will move and your strategy will be executed
in order to have your averages calculate, you need best few
days of replay date before your point of replay

It's not letting me download 3/11. I go to tools>historical data>load>download, select ES 06-17.. I check to see if it downloaded the 11th.. It didn't. I've done this 15 times. My playback is running at 30x speed (start 3/11/17 end 3/12/17), but when I look at the 15 minute es 6-17 chart, nothing is there. If I set it to 1 day, I see bars, from april to december, but the price isn't moving. what the hell am I doing wrong?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #32 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13


rleplae View Post
3/11 will not download
that is a Saterday
and the market is not open on Saterday

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

Started this thread Reply With Quote
  #33 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13



rleplae View Post
3/11 will not download
that is a Saterday
and the market is not open on Saterday

It's running.


Started this thread Reply With Quote
  #34 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13


rleplae View Post
3/11 will not download
that is a Saterday
and the market is not open on Saterday

Weird, I added the strategy to the chart, but it doesn't seem like it's plotting the SMA's at all. What does that mean?

Edit: Okay wait, when I click "enabled" and then "apply" it says "although you have order confirmation enabled, orders generated by a strategy will be submitted without confirmation."

And then "enabled" unchecks itself as if I had never touched it. What the shit?

Edit: I switched resolution to standard and now when I click enabled it stays enabled, but the SMAs still aren't there. What is going on?

Started this thread Reply With Quote
  #35 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13

Oh wow, okay. I found the problem. God, it's so obvious I feel like an idiot for not realizing this was what's happening!

It's caught in an infinite loop buying and selling repeatedly at the same spot, haha. It started out as this horrible noise like my computer was dying.. I have this voice on my computer saying

"O-o-o-o-o-o-o-o-o-order-o-o-o-ord-o-o-or-or-o-o-order filled... or-or-o-o-or-o-or-or-o-o-or-or-o-o-or-or-o-o-or-or-order filled. Order filled. O-o-o-order fill-order filled. o-or-or-o-or-or-o-or-or-o-o-or-o-o-or-order filled."

It's almost like a DJ scratching a record, it's ridiculous. If I ran this live, It would burn through my account in commissions alone at a rate dependent on my processor speed.

There doesn't seem to be an action for "don't trade for X amount of time"... How am I supposed to fix this? It's clearly happening because short SMA > long SMA is an entry condition, and long SMA > short SMA is an exit condition, so it's getting stuck as the short SMA crosses below the long one because it thinks the short SMA is both above and below the long SMA. So all I have to do is delay re entry until it passes, right? I'm going to see if adding "BarsSinceEntryExecution()> 2 will fix it. Nope. BarsSinceExitExecution? Nope. What the fuck? Is there a way to fix this where I get to use the same indicator for my entries and exits?




hahaha..

Started this thread Reply With Quote
  #36 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


alecsaccount View Post
Weird, I added the strategy to the chart, but it doesn't seem like it's plotting the SMA's at all. What does that mean?

Edit: Okay wait, when I click "enabled" and then "apply" it says "although you have order confirmation enabled, orders generated by a strategy will be submitted without confirmation."

And then "enabled" unchecks itself as if I had never touched it. What the shit?

Edit: I switched resolution to standard and now when I click enabled it stays enabled, but the SMAs still aren't there. What is going on?

This is normal, a strategy does not draw on the chart the averages.
I you want to see the averages, you will have to add them as an indicator to the chart as well

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #37 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13


rleplae View Post
This is normal, a strategy does not draw on the chart the averages.
I you want to see the averages, you will have to add them as an indicator to the chart as well

Okay, but averages aside... now that we've uncovered the problem, is there anything I can do about it?

I mean, It's cool that we found out that it's trying to buy and sell a thousand shares in a second, but is there a way I can make it do what it's supposed to (exit ONCE, *without* buying again immediately when it's in a long position and the fast SMA goes below the slow one within 15 bars after entry)?

Edit: Also, what's that rotating thing under your favorite futures there? I'm just curious.

Started this thread Reply With Quote
  #38 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


alecsaccount View Post
Okay, but averages aside... now that we've uncovered the problem, is there anything I can do about it?

I mean, It's cool that we found out that it's trying to buy and sell a thousand shares in a second, but is there a way I can make it do what it's supposed to (exit ONCE, *without* buying again immediately when it's in a long position and the fast SMA goes below the slow one within 15 bars after entry)?

Edit: Also, what's that rotating thing under your favorite futures there? I'm just curious.

Yes
1. you can add a flag, to avoid multiple entries
2. you could run the strategy only on bar close (still multiple orders possible, but only one per bar

the gif is a rotating view with GNU plot of a surface chart for an optimization of a CL trading bot

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #39 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

In the condition builder see if you can add a condition object that goes to your account
only buy if no positions = flat

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #40 (permalink)
 alecsaccount 
San Diego, California
 
Experience: Beginner
Platform: NinjaTrader 8
Trading: Emini ES, EUR/USD
Posts: 65 since Dec 2016
Thanks Given: 229
Thanks Received: 13



rleplae View Post
In the condition builder see if you can add a condition object that goes to your account
only buy if no positions = flat

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..?

Started this thread Reply With Quote




Last Updated on December 21, 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