Bar Delay Between Entries - MultiCharts | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > MultiCharts

Bar Delay Between Entries
Started:July 18th, 2013 (01:33 AM) by quantarb Views / Replies:821 / 3
Last Reply:August 9th, 2015 (05:42 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Bar Delay Between Entries

Old July 18th, 2013, 01:33 AM   #1 (permalink)
Elite Member
Wayne, NJ USA
Futures Experience: Intermediate
Platform: Multicharts, Deltix DCS
Broker/Data: Interactive Brokers/IQ Feed
Favorite Futures: ETF Options
Posts: 41 since Oct 2012
Thanks: 7 given, 36 received

Bar Delay Between Entries


Iím trying to find a way to have at least a certain number of bars between each entry. For example, I want there be at least six bars between each entry. After another new entry, the strategy must wait at least six bars before it is allowed to add to the position again.

Iím unable to use BarsSinceEntry(0) since it refers to the first entry of the current open position. I tried to create my own function BarsSinceLastEntry to retrieve the information I need.

If MarketPosition <> and BarSinceLastEntry >= 6 then     

Buy more contracts at market
However, my current code isnít working properly. When I insert it the strategy will stop adding to existing positions. Below is my own code for my own function BarsSinceLastEntry. I plotted it as an indicator and the functions appears to be working as intented. Iím not sure where I went wrong. Any ideas or suggestions would be greatly appreciated.

variablesvar0), var1)  ;

var0 CurrentShares

var0 var0[1] or var0 0 then 
//There must be a new entry - long or short  if CurrentShares increases.  This resets the bar count.  

if var0 var0[1] and var0 >= 1 then 
var1 1;

//If there is an open position, and the CurrentShares remains the same, add one to the bar count.  
var1 BarsSinceLastEntry

Reply With Quote

Old August 2nd, 2013, 06:54 AM   #2 (permalink)
Hamburg Germany
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
Posts: 1,109 since Apr 2013
Thanks: 188 given, 625 received

You might want to take a look into the reserved words PosTradeExitBar and PosTradeEntryBar. They make it possible to receive the specific entry and exit bar even with multi-leg positions.

Another approach would be to monitor a change in your market position or number of trades and save the bar number at this moment. Then you can block new trade entries as long as the new bar number < saved bar number + X.


Reply With Quote

Old August 6th, 2015, 02:21 PM   #3 (permalink)
Elite Member
Los Angeles CA
Futures Experience: Advanced
Platform: IB, MultiCharts
Favorite Futures: ES
Posts: 5 since Jan 2014
Thanks: 1 given, 0 received

I am having the same issue. Eagerly awaiting more info

Reply With Quote

Old August 9th, 2015, 05:42 AM   #4 (permalink)
The Netherlands
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: -
Jura's Avatar
Posts: 766 since Apr 2010
Thanks: 2,347 given, 643 received

grew View Post
I am having the same issue. Eagerly awaiting more info

What is "the same issue"? QuantArb talks about two things that aren't necessarily related: 'bar delay between entries and 'code stops adding to new positions'. Please be more specific if you want help.

Reply With Quote
The following user says Thank You to Jura for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > MultiCharts > Bar Delay Between Entries

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email delay Rad4633 Tech Support 2 January 3rd, 2013 03:38 PM
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 04:49 PM
NT7 Delay before new bar draws wldman NinjaTrader 16 August 28th, 2012 04:11 PM
need help stopping multiple entries on the same bar cboss EasyLanguage Programming 2 October 1st, 2011 11:04 PM
500 ms delay. How to create one arjfca MultiCharts 1 July 6th, 2011 08:47 AM

All times are GMT -4. The time now is 05:58 PM.

Copyright © 2016 by 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 2016-10-28 in 0.09 seconds with 19 queries on phoenix via your IP