NexusFi: Find Your Edge


Home Menu

 





500 ms delay. How to create one


Discussion in MultiCharts

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




 
Search this Thread
  #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 Backtesting • 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?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Trump Media to sell instant access to market-moving soci …
Traders Hideout
No book, only a stair: journaling fills where price move …
Cryptocurrency
Datafeed for Atas
Platforms and Indicators
EA
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
BERN ALGOS algo trading journal
3 thanks
NexusFi site changelog and issues/problem reporting
2 thanks
TopStep Trader disappointment
2 thanks
Want your NinjaTrader indicator created, free?
1 thanks
Running trading strategies on a VPS
1 thanks
  #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 X Reply With Quote




Last Updated on July 6, 2011


© 2026 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 - Downloads - Top
no new posts