NexusFi: Find Your Edge


Home Menu

 





MultiCharts lag time?


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one bobbakerr with 63 posts (24 thanks)
    2. looks_two Big Mike with 19 posts (19 thanks)
    3. looks_3 Jura with 11 posts (8 thanks)
    4. looks_4 Bimi with 10 posts (7 thanks)
      Best Posters
    1. looks_one bretter with 4 thanks per post
    2. looks_two RM99 with 2.3 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 bobbakerr with 0.4 thanks per post
    1. trending_up 56,350 views
    2. thumb_up 144 thanks given
    3. group 23 followers
    1. forum 171 posts
    2. attach_file 2 attachments




 
Search this Thread

MultiCharts lag time?

  #41 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541

Why not use limit orders, especially with MB Trading. ?

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #42 (permalink)
nismo
Australia
 
Posts: 32 since Dec 2010
Thanks Given: 7
Thanks Received: 3


Big Mike View Post
Why not use limit orders, especially with MB Trading. ?

Mike

Am definitely going to do this and run this side by side the same system as the market orders and see how both perform.

Any thoughts on my other questions. Is 14pips/0.0014 an acceptable amount of slippage in the forex market?

and am I checking the slippage the right way by comparing my entry price versus back test results on tick data?

Reply With Quote
  #43 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541



nismo View Post
Is 14pips/0.0014 an acceptable amount of slippage in the forex market?

No, 1 tick/pip is usually the spread, or less.


Quoting 
and am I checking the slippage the right way by comparing my entry price versus back test results on tick data?

No way to know. If you are using exotic chart types or if your strategy logic has an error, then no, backtests will never be accurate.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #44 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


bobbakerr View Post
[..]
I'm working on correcting the code (for ES) right now. If I can get it to 'obey' correctly, I'll watch it for a couple of days, and if all goes well then HIT IT AGAIN.

How's it going Bob? Do you still experience lag and bad fills or is the real-time performance more in line with the backtested results?

Regards,

Reply With Quote
  #45 (permalink)
 
bobbakerr's Avatar
 bobbakerr 
Riverdale, Idaho, USA
 
Experience: Intermediate
Platform: Optimus Futures + MultiCharts + TradeStation
Broker: Optimus Futures, Rithmic Data, TradeStation
Trading: CL, ES
Posts: 115 since Aug 2010
Thanks Given: 241
Thanks Received: 51

Jura, I haven't traded it Real Life yet. I'm having basically the same problem with it as with CL (just not as magnified). I'll write the code (or make a small change in it), then check the backtesting results, and they're great. I'll then watch it run for awhile and the results are not so great. (In fact it loses.) I'll then change the code, re-check the backtesting results, and the results are great again, with many signals having been eliminated, seemingly keeping only the winners.

I don't know why MultiCharts (and TradeStation) does (do) this. It is 'cheating' in my opinion.

So I'm looking for a different strategy that goes for longer runs that will minimize the cheating that goes on in backtesting. I want to see something that does the same in real life and also works the same way in the past. That is difficult.

Perhaps I'll never find an automated strategy for this. But at my age (I'm 66 now), I don't want to go through the stress of manually trading anymore. I don't want to have to constantly be making the instantaneous decisions that are required for this game. So I'm looking, testing, looking, testing, ...

I'll let you guys know if/when I come up with something that truly works in real life. Everything works in the pretend world. But it's Real that counts!

Started this thread Reply With Quote
  #46 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690

Thanks for your update Bob. It seems like a daunting task to trade automatic. I find it puzzling that MC misses trades in real-time that it would have taken when backtesting. I haven't auto traded myself with MC, but it seem I can anticipate some unpleasant surprises judging from your experiences.

Good luck with your strategy development!

Reply With Quote
  #47 (permalink)
 SPTrading 
London, England
 
Experience: Intermediate
Platform: MC, TS, NT
Broker: TradeStation
Trading: ES
Posts: 41 since Oct 2009
Thanks Given: 12
Thanks Received: 21


bobbakerr View Post
I don't know why MultiCharts (and TradeStation) does (do) this. It is 'cheating' in my opinion.


I just wondered again if you have you considered my suggestion on page 3 of this thread? I feel sure that the trade management systems in both TradeStation and Multicharts will reject any limit orders which at the time of submission are effectively stop limit orders! The back test will probably not pick this up because they will be treated as market orders.

Reply With Quote
  #48 (permalink)
 
bobbakerr's Avatar
 bobbakerr 
Riverdale, Idaho, USA
 
Experience: Intermediate
Platform: Optimus Futures + MultiCharts + TradeStation
Broker: Optimus Futures, Rithmic Data, TradeStation
Trading: CL, ES
Posts: 115 since Aug 2010
Thanks Given: 241
Thanks Received: 51

SPTrading, I don't have any 'Stop Limit Orders' in my code.

I'll PM you the stupid code. If you can make it work properly in Real Life, then we'll both be rich.

Started this thread Reply With Quote
  #49 (permalink)
 bretter 
Austin, TX
 
Experience: Advanced
Platform: Tradestation
Posts: 16 since Sep 2010
Thanks Given: 5
Thanks Received: 12

Recently I have done a lot of work on why real time auto-trading doesn't match backtesting. It seems that it depends a lot on when the signals are generated and whether the calculations are intrabar or not. I was testing a well known universal system and it would constantly generate trades in real time that would not show up in back testing and I gave up when I could not get real time trades anywhere close to what back testing said. I have tried other systems that trades would show up in back testing, but would not show up in real time and ended up being the same unusable for real life.

So it depends heavily on what bars you are using - time bars? Tick bars? Some insight comes from TS:
https://www.tradestation.com:443/discussions/topic.aspx?topic_id=107938 and for those that can't access the forums, some selected cut/paste:


Quoting 
If your strategy requires determining on which tick a calculation achieved a certain value, such as RSI or position loss, then your strategy will need to run on each tick (trade). For back-testing historical data, to enable the strategy to run on each tick, you must set Look-inside-bar Back-testing (LIBB) to a 1-tick interval, and also enable Intrabar Order Generation (IOG) so your strategy runs on each LIBB bar interval. Keep in mind that for back-testing historical data only 6-months of 1-tick based data is available. For a strategy to run on each tick for live trading only IOG needs to be enabled. Note that when the strategy runs on ticks within the bar you made need to use IntrabarPersist variables to retain variable values across ticks. The use of LIBB and IOG are advanced topics. For more information see Strategies/Indicators running on each tick or Entries/Exits depending on the detailed price/volume path within a bar at Introduction – Developing and Implementing Strategies and Indicators.

If your state machine is to do certain calculations only on the closing tick of each bar, but your strategy is running on each tick, then you can use a conditional check on the bar status, like: if BarStatus(1) = 2 then …, which is true only on the closing tick of the bar. If your state machine determines that orders are to be issued, keep in mind that Limit or Stops orders ( Buy / Sell / SellShort / BuyToCover ) must be issued on every subsequent tick to remain active. For example, if your state machine determined that a Buy Limit order should be issued and kept active until the closing tick of the next bar, then a Buy Limit order would have to be issued each tick until the closing tick of the next bar.

If your strategy only runs on the closing tick of each bar (neither LIBB or IOG are enabled) then Limit or Stop orders issued at the closing tick of a bar remain in effect until the closing tick of the next bar, and you can fill Limit or Stop orders within bars. For more information see Strategy Limit and Stop Orders Are Executed Intrabar at the above link.

If you are using regular price bars (not Advanced Bar Types, like Momentum, Renko, Three-Line Break, etc), then use "at next bar at market" orders instead of "this bar at close" orders. It will result in your back-testing of historical trades more accurately matching actual live trading results.

If you want to be sure that your orders always rapidly fill, then use Market or Stop orders. Limit orders may not fill if the limit price is not penetrated, especially for high volume markets where your orders may be at the bottom or back of the book.

Stop orders execute when the price is touched. For example, Buy at next bar at 100 Stop ; means that when the price of 100 is hit (from below) a Market order is issued. Again, you cannot exactly control the price the order fills at. Rather, what you control is when the Market order is issued.

Limit orders control the price at which the order fills. For example, Buy at next bar 100 Limit ; will fill at a price of 100 or lower when the limit price of 100 is hit (from above). Limit orders have the disadvantage that even though the Limit price is touched, they may not fill at times, depending on where your order sits in the book or queue. For high volume symbols which trade very frequently, the order book can be very deep, meaning there are many orders (hundreds or thousands of orders) queued up at the same price. The first orders received in the book are the first orders processed. Your order will not be processed at a given Limit price until all other Limit orders at the same price which are ahead of your order are first filled. By the time they fill, the price may then move away from the Limit price, and your Limit order may never fill.

Stop Limit orders both control the price at which the order is triggered, and the price at which the order fills at. TradeStation does not support native Stop Limit orders, but there are ways to emulate Stop Limit orders.


Reply With Quote
  #50 (permalink)
 bretter 
Austin, TX
 
Experience: Advanced
Platform: Tradestation
Posts: 16 since Sep 2010
Thanks Given: 5
Thanks Received: 12


Some more on EL next bar behavior:
https://www.tradestation.com:443/wiki/display/EasyLanguage/2007/12/05/Strategy+Orders+Are+Executed+Intrabar


Quoting 
Here's a myth: "TradeStation cannot execute strategy orders until the end of a bar." A slightly newer version of this myth is: "TradeStation cannot execute strategy orders intrabar unless intrabar order generation, the feature that causes strategy code to run intrabar, is enabled." We are going to debunk both versions of this myth today.

First, let's cover a bit of terminology. By intrabar, we mean "instantaneously, at any time during the formation of a bar on a chart." The term intrabar is commonly contrasted with end-of-bar, by which we mean "once per bar, at the bar's closing price."

As you come to understand how EasyLanguage runs, and what the "next bar" order placement syntax does, you'll realize that it is easy to place orders that are executed intrabar, without the use of intrabar order generation (IOG).

EasyLanguage strategy code runs on each bar of a chart, beginning immediately after enough bars are available to perform all of the calculations that the strategy requires. The code then runs on every historical bar, proceeding from left to right, until it reaches the last bar on the chart, the most current bar on the chart. As code runs on a given bar, an order can be placed for execution on the "next bar." Such orders will be executed intrabar, during the next bar, prior to the next running of the strategy code, provided that the price criteria for the order is met. Intrabar order generation is not required to achieve intrabar order execution.

Let's look at an example. Imagine that you are using a 10-minute bar chart. Let's presume that, based on the logic implemented in your strategy, the following EasyLanguage statement is executed when the strategy code runs at the end of the 9:40 A.M. bar: Buy next bar High stop ;

What will happen when the next bar, the 9:50 bar, forms? During the 9:50 bar, if the stop price, the high of the 9:40 bar, is hit, an order will be immediately executed. The order will be placed immediately when the stop price is hit, intrabar. There is no need for IOG to be enabled, and no need to wait for the end of the 9:50 bar. "Next bar" limit orders are executed intrabar in the same manner.
All of this begs the question: When is IOG required? IOG must be enabled if you don't have all of the information you need in order to place an order, for current bar execution, at the close of the previous bar. Often, such strategies attempt to place orders instantaneously based on values that cannot be calculated ahead of time. For example, a strategy that buys immediately when two moving averages cross, intrabar, would require IOG. In the example above, on the other hand, the strategy decides, during the 9:40 bar, whether, and at what price, to place an order for execution during the 9:50 bar. For this reason, IOG is not required. Remember: Intrabar calculation is not necessarily required for intrabar execution. For more on IOG, follow this link[IMG]https://www.tradestation.com/wiki/images/icons/linkext7.gif[/IMG].


Reply With Quote




Last Updated on April 4, 2012


© 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