MultiCharts lag time? - MultiCharts | futures io social day trading
futures io futures trading


MultiCharts lag time?
Updated: Views / Replies:29,878 / 171
Created: by bobbakerr Attachments:2

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
 2  
 
Thread Tools Search this Thread
 

MultiCharts lag time?

  #51 (permalink)
Elite Member
Austin, TX
 
Futures Experience: Advanced
Platform: Tradestation
 
Posts: 16 since Sep 2010
Thanks: 5 given, 12 received

Order Generation

A problem arises when you start using "next bar ..." and tick data. If Intrabar order generation is enabled, then the order for "next bar ..." may only be valid for the next tick, so you have to keep issuing the order.


Quoting 
>>Is there a way to ensure that the stop or limit order is held for longer than 1 tick?

If you want to keep the order active for a specified amount of time or bars, you can use intrabar persist variables to keep track of the elapsed time, number of ticks, or number of bars.

Example code:

Quoting 
variables:
IntraBarPersist Count( 0 ) ;

if BarStatus( 1 ) = 2 then
Count = 0 ;

if Close < Lowest( Low, 10 )[1] then
Count = Count + 1 ;

if Count <> 0 then
print( ELDateToString(Date)," ",Time:4:0," ", Count, " ", Close ) ;

if MarketPosition <> 1 and Count > 5 then
begin
buy next bar at Lowest( Low, 10 )[1] + MinMove / PriceScale stop ;
print("Issuing buy stop order at ", Lowest( Low, 10 )[1] + MinMove / PriceScale ) ;
end ;

if BarsSinceEntry = 5 then
sell next bar at market ;


The code uses an IntrabarPersist variable as a counter to count the number of intrabar ticks that occur below a new 10 bar lowest low. If more than 5 ticks occur below the lowest low during a bar, then a buy stop order is issued at a price increment ( a minmove ) above the lowest low.

The idea is to go long if price makes a new 10 bar low, holds the low for at least N number of ticks during the bar and then reverses and rallies back above the low. If the end of the bar is reached, the stop order is no longer issued.

To test the code in history, enable intrabar execution and use look-inside-bar-backtesting. I tested this on @ES.D, 10 minute bars, with intrabar enabled, and look-inside-bar backtesting set to 1 minute resolution.

More detail on IOG:
https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=36421


Quoting 
If checked, orders can be generated as frequently as every tick during a bar. If unchecked, orders can be generated only on bar close (or at bar open for ‘open next bar’ strategies).

The setting is disabled by default. The value of the setting is associated with each individual strategy that is applied to a chart. Different strategies in the same strategy group may have different settings.

When ‘Enable intrabar order generation and calculation’ is checked a choice is provide to determine whether fills should occur more than once per bar.

• If ‘Limit entries from same signal in this strategy and exits from same signal in this strategy to once per bar’ is selected, each entry and exit order from the same signal can be filled only one time per bar (even if Position Limits settings have pyramiding enabled). This option is selected by default.

• If ‘Limit entries from all signals in this strategy and exits from all signals in this strategy to once per bar’ is selected, the strategy will enter and exit only once per bar.

• If ‘Allow any entry from this strategy and any exit from this strategy to occur multiple times per bar’ is selected, the strategy may enter and exit from the same or from different signals as many times per bar as conditions dictate.


What does [0] now mean?
When “Enable intrabar order generation” is enabled then [0] refers to the in-progress bar.


How will historical calculations work?
When “Enable intra-bar order generation” is disabled historical calculations will behave as they did in prior TradeStation versions. When the intrabar calculation setting is enabled, historical calculations will vary based on the ‘Look-Inside-Bar’ back-testing settings:

- Historical calculations with Look-Inside-Bar Back-testing disabled:

When Look-Inside-Bar Back-testing disabled, historical strategy calculations will occur 4 times per bar on the Open, High, Low, and Close of the historical bar.

The actual calculation order will depend on the proximity of the high and low to the open. If the open is closer to the high then calculations will proceed in the following order: Open, High, Low, and then Close. If the open is closer to the low then calculations will proceed in the following order: Open, Low, High, and Close.

Volume is split between the 4 points (Volume / 4). Open interest will not be divided by 4

- Historical calculations with “Look-Inside-Bar Back-testing” enabled:

When Look-Inside-Bar Back-testing” is enabled, historical strategy calculations will occur on the Open, High, Low, and Close of each interim ‘Look-Inside’ bar. If using tick resolution, a calculation will occur on the tick only. The high and low will update on each interim Look-Inside bar to simulate the creation of a bar in progress. After the last Look-Inside bar is processed a calculation will occur one more time on the actual close of the bar.


Intrabar on Multiple Datastream Charts
Intrabar order generation is not allowed on multiple datastream charts.


Open next bar systems
Enable Intra-bar order generation is not allowed for open next bar systems. However, since calculations can occur on each tick during the bar, EasyLanguage code can detect the open of the bar and execute specific code at the open. This enables ‘open next bar’ type strategies to be rewritten as intrabar strategies, if desired.


How to write code that evaluates intrabar, and places orders intrabar?
Enable intra-bar order generation and calculation for the strategy on the Format Strategy Dialog – Calculation Tab.

Write the EasyLanguage code to place the order as a ‘next bar’ order; it will be active for the next tick for the in-progress bar.

For example:

if MarketPosition <> 1 and close > close[1] then
buy next bar at market ;

This will place a market order for the next tick of the in-progress bar, if the close of the current in-progress bar is greater than the close of the prior bar.


How to write code that evaluates intrabar, but places orders only on the bar close?
Use the BarStatus reserved word. For example:

If BarStatus(1) = 2 then
{ place orders for next bar }
buy next bar at market ;


IntrabarOrderGeneration EasyLanguage Attribute
An attribute has been added to EasyLanguage [IntrabarOrderGeneration=True/False] that allows the intrabar order generation capability to be turned on or off from within EasyLanguage. This attribute value will override the user interface setting in the Format Strategy dialog.

If the attribute is not present in the strategy code, the intrabar order generation and calculations setting will be controlled through the Calculations tab of the format Strategy window. If the attribute is present and set to TRUE, the ‘Enable intrabar order generation and calculation’ flag will be checked, the checkbox will be disabled, and the radio buttons will be available.

If the attribute is present and set to FALSE, the ‘Enable intrabar order generation and calculation’ flag will unchecked and the checkbox and radio buttons will be disabled.

The syntax for the attribute is as follows:

[IntrabarOrderGeneration = Value] where Value can be TRUE or FALSE

The attribute may only be used in a strategy. Attributes are evaluated at compile time only, so their values cannot be changed at run-time.

Usage Example:

[IntrabarOrderGeneration = FALSE] // Strategy will only generate orders at close of bar

I hope this helps!
Brett

Reply With Quote
The following 5 users say Thank You to bretter for this post:
 
  #52 (permalink)
Elite Member
Riverdale, Idaho, USA
 
Futures Experience: Intermediate
Platform: Optimus Futures + MultiCharts + TradeStation
Broker/Data: Optimus Futures, Rithmic Data, TradeStation
Favorite Futures: CL, ES
 
bobbakerr's Avatar
 
Posts: 106 since Aug 2010
Thanks: 211 given, 39 received

Brett, what a GREAT series of posts. Very informative and helpful. Thank you for all that time and effort.

I do have 'Intra-bar Order Generation' turned on for the code and I also have 'Use Bar Magnifier' checked with 1 Tick as the defining interval. I think Bar Magnifier in MultiCharts is equivalent to 'Intra-bar Order Persist' in TradeStation, but I'm not sure.

I need to re-read and re-read all that you've posted here so that I can completely understand all you've written.

Thanks again.

Reply With Quote
 
  #53 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received



bobbakerr View Post
Brett, what a GREAT series of posts. Very informative and helpful. Thank you for all that time and effort.

I do have 'Intra-bar Order Generation' turned on for the code and I also have 'Use Bar Magnifier' checked with 1 Tick as the defining interval. I think Bar Magnifier in MultiCharts is equivalent to 'Intra-bar Order Persist' in TradeStation, but I'm not sure.

I need to re-read and re-read all that you've posted here so that I can completely understand all you've written.

Thanks again.

Intrabar Order Generation means orders can be submitted intrabar instead of at close of bar. It is off by default, you have to explicitly enable it.

Intrabar Persist means a var: can be updated intrabar instead of only at the close of a bar. It is off by default.

Bar Magnifier takes non-tick data and fills in the missing ticks to give you more accurate results. For example if you submit orders on a 5 minute chart, and you have a 5 minute bar that is real big - wick/tail - and both the tail and wick include both your stop and target. Bar Magnifier allows MC to know the true order of the OHLC so it can determine if your stop or target was hit first, otherwise it does not know the order. By default MC assumes the worst when filling these orders without bar magnifier, unlike NT which assumes the best.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #54 (permalink)
Trading Apprentice
Australia
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: forex
 
Posts: 32 since Dec 2010
Thanks: 7 given, 3 received


Big Mike View Post

Bar Magnifier takes non-tick data and fills in the missing ticks to give you more accurate results. For example if you submit orders on a 5 minute chart, and you have a 5 minute bar that is real big - wick/tail - and both the tail and wick include both your stop and target. Bar Magnifier allows MC to know the true order of the OHLC so it can determine if your stop or target was hit first, otherwise it does not know the order. By default MC assumes the worst when filling these orders without bar magnifier, unlike NT which assumes the best.

Mike

Hi Mike, I was under the impression that bar magnifier still requires the data of what ever you set it to. Ie if you have a 5min strategy and enable bar magnifier to '1 tick' then you require tick data and this just enables the use of the tick data while back testing. If you don't have the tick data then that is when MC does its assumptions for order filling and which happened first in the bar.

This is the way I understand it to work but please correct me if I'm wrong. How else would MC know what happened intrabar without tick data?

Reply With Quote
 
  #55 (permalink)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received


nismo View Post
Hi Mike, I was under the impression that bar magnifier still requires the data of what ever you set it to. Ie if you have a 5min strategy and enable bar magnifier to '1 tick' then you require tick data and this just enables the use of the tick data while back testing. If you don't have the tick data then that is when MC does its assumptions for order filling and which happened first in the bar.

This is the way I understand it to work but please correct me if I'm wrong. How else would MC know what happened intrabar without tick data?

As far as I know, you're both right: the Bar Magnifier can use both ticks as well as minutes (see picture).

So, for example, if you backtest a strategy on a 10 minute time frame, but don't have tick data, you can use the Bar Magnifier with a one minute setting (since that's available, even though there is no tick data). And when backtesting on a 100 tick chart, the Bar Magnifier can be set to 1 tick or use the minutes. (Though I doubt this will give more accurate results when the Bar Magnifier is set to minutes while backtesting on ticks).

According to the MultiCharts manual (p. 204)

Quoting 
The Bar Magnifier backtest feature is important for precise backtesting. Bar magnifier can be considered as a replay of the way
a bar was formed. The user can choose a replay frequency that is based on number of ticks or number of minutes.

There is a tradeoff between the level of precision in a replay and memory requirements. Tick-by-tick replay is the most precise,
but it also requires the most memory. If the strategy does not require high precision, then replays based on n-ticks or n-minutes
may be sufficient.

For example, Bar Magnifier is helpful when both the profit target and stop loss occurred on the same bar. In this situation, it is
unclear whether the profit target or the stop loss occurred first. With Bar Magnifier, MultiCharts is able to see how the bar was
formed to determine whether the profit target or the stop loss occurred first.

We suggest to use tick because most precise.

Regards,

Attached Thumbnails
MultiCharts lag time?-barmagnifier.png  
Reply With Quote
The following user says Thank You to Jura for this post:
 
  #56 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received


nismo View Post
Hi Mike, I was under the impression that bar magnifier still requires the data of what ever you set it to. Ie if you have a 5min strategy and enable bar magnifier to '1 tick' then you require tick data and this just enables the use of the tick data while back testing. If you don't have the tick data then that is when MC does its assumptions for order filling and which happened first in the bar.

This is the way I understand it to work but please correct me if I'm wrong. How else would MC know what happened intrabar without tick data?

Yes for sure, it requires tick data if you tell it to use tick data resolution. Sorry if I suggested otherwise, it was not my intention. I'm pretty sure it will just throw an error message if you try to use it without tick data.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #57 (permalink)
Trading Apprentice
Australia
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: forex
 
Posts: 32 since Dec 2010
Thanks: 7 given, 3 received


Big Mike View Post
Yes for sure, it requires tick data if you tell it to use tick data resolution. Sorry if I suggested otherwise, it was not my intention. I'm pretty sure it will just throw an error message if you try to use it without tick data.

Mike

No worries Mike, I"m just making sure I'm understanding MC correctly thats all.

Reply With Quote
 
  #58 (permalink)
Trading Apprentice
Lahore, Pakistan
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: EUR/USD
 
Posts: 3 since Jun 2011
Thanks: 0 given, 2 received

The ONLY MAGIC

When I was a beginner traders I read a story about a trader in a bygone age who lived far away from the big city, and sent written orders to his brokers via postal mail. He made a lot of money.

Because he knew his limitations and traded within them.

I trade FX. PFGBest is my broker, and I use no-backfill PFGBest data fed into my MultiCharts. My latency is 300ms on average. Yet my fills are EXCELLENT.

Because I know my limitations and have learned to trade within them.

This is the ONLY MAGIC I KNOW.


Last edited by Khalaad; June 25th, 2011 at 11:44 AM.
Reply With Quote
The following user says Thank You to Khalaad for this post:
 
  #59 (permalink)
Elite Member
Riverdale, Idaho, USA
 
Futures Experience: Intermediate
Platform: Optimus Futures + MultiCharts + TradeStation
Broker/Data: Optimus Futures, Rithmic Data, TradeStation
Favorite Futures: CL, ES
 
bobbakerr's Avatar
 
Posts: 106 since Aug 2010
Thanks: 211 given, 39 received

You have adapted well, Khalaad. That's what I'm trying to do now.

Reply With Quote
 
  #60 (permalink)
Trading Apprentice
Lahore, Pakistan
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: EUR/USD
 
Posts: 3 since Jun 2011
Thanks: 0 given, 2 received


bobbakerr,

You are doing lots of things right; systematic trading is one of them. And although no one should tell you what style to trade, I think you particularly need to think through how frequently you trade.

I am new to systematic trading, but I did spend many, many hours doing my homework; lots of things I tried suggest to me when you test you test codes, not methods. The line between the two is ultra-fine, but results wise the differences are huge.

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

Reply



futures io > > > > MultiCharts lag time?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
John Ehlers Zero Lag ebtrader ThinkOrSwim Programming 3 April 2nd, 2017 10:49 PM
how the macd zero lag indicator works DarrenH NinjaTrader 6 September 13th, 2013 04:31 PM
Queue a backtest in multicharts same symbol on multiple time frames? crbucks MultiCharts 4 June 23rd, 2011 11:33 AM
MBTrading Data Error-Lag Sad Planet Reviews of Brokers and Data Feeds 3 May 5th, 2011 06:05 AM
MACD_Zero Lag Indicator Explanation GilR NinjaTrader 4 February 25th, 2011 07:36 AM


All times are GMT -4. The time now is 04:32 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-15 in 0.18 seconds with 20 queries on phoenix via your IP 54.234.255.29