NexusFi: Find Your Edge


Home Menu

 





500 ms delay. How to create one


Discussion in MultiCharts

Updated
    1. trending_up 2,794 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

500 ms delay. How to create one

  #1 (permalink)
 arjfca 
Montreal, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: Interactive Broker
Trading: Forex
Posts: 263 since Sep 2010
Thanks Given: 440
Thanks Received: 91

Hello

I have posted a similar question on Multicharts forum

MultiCharts: Trading Software for Automated Trading and [AUTOLINK]Backtesting[/AUTOLINK] • View topic - My 500 ms Delay code froze MC

Using Easylanguage, I want to create a 500 ms delay. To do so, I used the getmachinetime.dll to capture the actual time. I then add 500 ms to it and store the value to a variable Targettime

Problem is the code froze Multicharts when I tried to turn off the indicator.

My question is, is there a better way to create a delay?
 
Code
//Function MachineTime
DefineDLLFunc:   "GetMachineTime.dll", Long,"MachineTimeMill";
MachineTime = MachineTimeMill;

//Indicator DisplayTime

Var:
TargetTime (0),
Delay (500);

Targettime = MachineTime + delay;
While Value1 =0 begin
   if machinetime >= Targettime then 
   begin 
      print (Targettime);
      Targettime = MachineTime + delay;
   end;
end;
Any help truly appreciated.

Martin


Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
What broker to use for trading palladium futures
Commodities
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (permalink)
 
MultiCharts's Avatar
 MultiCharts 
Columbus, Ohio, US
 
Experience: Intermediate
Platform: MultiCharts
Broker: Multiple/Multiple
Trading: ES, EUR/USD
Posts: 168 since Oct 2010
Thanks Given: 74
Thanks Received: 172

I believe you answered your own question on the other forum

MultiCharts - Raising the Trading Standard.
Please send me a private message if you have any further questions about MultiCharts
Follow me on Twitter Reply With Quote




Last Updated on July 6, 2011


© 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