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 57,217 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?

  #91 (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 View Post
 
Code
                            
// Resetting variables every tick between from 15:12 til 15:59
If Time 1511 and Time 1600 then begin
  BuySig 
0
  
SSSig 0
  
Min 9999
  
Max 0;
end;

Condition1 Time 1500;  // Mountain Time        (GMT - 6; UTC - 7)
// Long and short orders need this condition to be true when entering a trade

// Time exit after 15:10
If MarketPosition >= and Time 1510 then 
    Sell next bar at market

Enter trades before 15:00;
Exit open positions after 15:10;
Reset variables between 15:12 and 15:59.

Shouldn't these variables be reset after a trade is closed, so the following trade can use the right values?


I thought they would get re-set as the trades went on. They are calculated constantly. But I inserted code to have them all reset after the Limit Order is placed to make the Entry. The problem with this is if the order is not filled, then everything is reset without getting into the position:
 
Code
                            
If MarketPosition<>and BuySig=1 then begin
  
If Condition1=True then
    Buy next bar at LongEntry
{InsideAskLimit;
    
BuySig=0SSSig=0Min=9999Max=0LongEntry=0;
end;
If 
MarketPosition<>-and SSSig=-1 then begin
  
If Condition1=True then
    SellShort next bar at SSEntry
{InsideBidLimit;
    
SSSig=0BuySig=0Min=9999Max=0SSEntry=9999;
end
This then gives results of:
ES (.25 Range Bars): + 39,645 Net on 320 R.T.'s; 85.0% Success Ratio; -1158 Longest Losing Streak.
CL (.02 Range Bars): + 181,390 Net on 4722 R.T.'s; 55.9% S.R.; -2039 L.L.S.
CL (40-sec. Bars): + 296,907 Net on 3036 R.T.'s; 80.3% S.R.; -611 L.L.S.
CL (12-Tick Bars): + 31,086 Net on 3298 R.T.'s; 41.2% S.R.; -4048 L.L.S.

There were fewer Signals, and some results improved, some got worse. I don't know yet whether to keep this change in. So far it's in.


Quoting 
... Anyway, before going further off topic, what kind of data do you use Bob, Rithmic right? I guess you've also backtested on that data?

For Actual Live Trading, yes I do use Rithmic. But for this backtesting, I'm using OpenECry's data. It allowed me to go back in time whereas Rithmic didn't.

And no, I don't consider you a 'smartass'. I think we all want this code to work properly and you have been very helpful. I appreciate that and all the help from the rest of you guys. Thanks again.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Quant vue
Trading Reviews and Vendors
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #92 (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 View Post
... Btw, if you want to reset the variables after exiting a position, it might be worth trying to save the MarketPosition into a variable, so you can reference the MarketPosition value from previous bars (I don't know if you want to do that). Something like this perhaps:

 
Code
Variables:
    MP(0),                    // Saves the Market Position so it's possible to access previous values
    barsInPosition(0)     // Example variable which we want to reset
    ;
    
if currentbar = 1 then cleardebug;    
    
MP = MarketPosition;            // Save the MarketPosition in the current value of 'MP'

if MP = MP[1] then            // If the MarketPosition on this bar is the same as the previous bar, we add one to the counter.
    barsInPosition = barsInPosition + 1
else                                // If the MarketPosition on this bar is different than the previous one, reset the counter to 1.
    barsInPosition = 1;

// Print output
Print(Date:6:0, "_", time_s:6:0, " MarketPosition: ", MP, " MarketPosition Previous bar: ", MP[1],
    " Bars in Position: ", barsInPosition:0:0);


Stupid me. I respond to the posts sequentially. If I would have read a little further down, I could have used your code to reset those variables. I'll do this change next!

-------------------------------------------------
EDIT:

I changed the variable resetting code as per Jura. The results barely changed:
ES (.25 Range Bars): + 39,819 Net on 320 R.T.'s; 85.3% Success Ratio; -1158 Longest Losing Streak.
CL (.02 Range Bars): + 181,383 Net on 4724 R.T.'s; 55.9% S.R.; -2039 L.L.S.
CL (40-sec. Bars): + 296,907 Net on 3036 R.T.'s; 80.3% S.R.; -611 L.L.S.
CL (12-Tick Bars): + 31,086 Net on 3298 R.T.'s; 41.2% S.R.; -4048 L.L.S.

Started this thread Reply With Quote
  #93 (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


This post is aimed mostly at MultiCharts.

I've been watching ES trade all morning. It's way less volatile than CL, with around 10 times as much volume.

I see REPEATEDLY missed signals, by as much as 3 minutes to 14 minutes! And then MultiCharts will finally insert those signals onto the chart roughly about where they were supposed to be -- 3 to 14 minutes earlier than the time that MC finally realized that these signals should have been given.

Why is that? And how can anything be traded Automatically with a time lag like that ???

I was using Open E Cry for my data feed. The data on the charts 'kept up' fine. I had the DOM from Rithmic's data feed also showing, and things were agreeing.

Any response, MultiCharts?

Started this thread Reply With Quote
  #94 (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,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661

I'd like to see a video of your problems in action.

You can download CamStudio for free, and record a video in SWF format that captures the bug and then upload it as an attachment to the forum. If it is a large file, you may need to zip it first before uploading. It is a straightforward program to use.

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
  #95 (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

Mike, I'll send you my code and YOU do it. I'm fed up.

Started this thread Reply With Quote
  #96 (permalink)
 JackR 
Washington, DC
 
Experience: Intermediate
Platform: Multicharts
Broker: InteractiveBrokers/IB
Trading: CL\EUR
Posts: 15 since Jan 2011
Thanks Given: 10
Thanks Received: 8


bobbakerr View Post
And then MultiCharts will finally insert those signals onto the chart roughly about where they were supposed to be -- 3 to 14 minutes earlier than the time that MC finally realized that these signals should have been given.

Bob:

Are you saying the MC chart is keeping current with your feeds but it "back-inserts" signals while running?
Also - What version of MC are you running?

Jack

Reply With Quote
  #97 (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

Exactly! And it happens about 1/2 the time. I'm running Version 6.2 Build 4338.

Started this thread Reply With Quote
  #98 (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

In trying to overcome this 'lag time' thing, I have been experimenting with different ways to get signals to be timely. One of them is to tell the program to Buy if the Current Inside Bid of Data2 is greater than the last Close of Data2. If so, then it's supposed to Buy off of Data1. But it doesn't work. I'll put that fragment of code below and if anyone can figure out how to get this to be recognized and actually work, I'd sure appreciate it. Thanks.

 
Code
If Time {of data2}=CurrentTime and InsideBid of data2>C[1] of data2 then Buy next bar at Market;
The 'InsideBid' and 'InsideAsk' terms only work on the CURRENT Bids and Asks. So that is why I have 'CurrentTime' in there. But as I watch the live proceedings, the statement is just completely ignored. No Buys or Shorts ever occur off of it.

Started this thread Reply With Quote
  #99 (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,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661


bobbakerr View Post
Mike, I'll send you my code and YOU do it. I'm fed up.

Sorry, I don't have time for such a thing - I was just trying to help you, and the video showing what your describing would be beneficial to understanding the problem.

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
Thanked by:
  #100 (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,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661



bobbakerr View Post
Exactly! And it happens about 1/2 the time. I'm running Version 6.2 Build 4338.

First thing is to upgrade to version 7, about a million bug fixes...

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




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