NexusFi: Find Your Edge


Home Menu

 





MillisecondsFromDateTime


Discussion in MultiCharts

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




 
Search this Thread
  #11 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

Hi nivi,

you need two additional variables (that need to be intrabarpersist) and then store the value of the first variable in the second and then store the current close in the first variable. This way you can compare the value of the last two real time ticks using these two new variables.

Regards,

ABCTG


nivi View Post
Sorry but I dont understand
Historical bar is no problem, it works on real time.

You say: "You will require two variables for that on each code calculation store the value of the first variable in the second and then store the current close in the first variable. This way you can compare the value of the last two real time ticks."

That's not the problem. Look the code:
 
Code
	t2 = t1;
	t1 = SecondsFromDateTime(ComputerDateTime) + MillisecondsFromDateTime(ComputerDateTime) / 1000;
The problem is that this code must be executed every time a new level in the price occurs. Of course intrabar.


Follow me on X Reply With Quote

Can you help answer these questions
from other members on NexusFi?
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
CME Raises Energy Futures Margins After Iran-War Volatil …
Commodities
ATFX Suspends Prop Trading Unit ATFunded -- Full Review …
Funded Trading Evaluation Firms
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
  #12 (permalink)
nivi
Madrid, Spain
 
Posts: 30 since Feb 2017
Thanks Given: 4
Thanks Received: 6

Sorry. I can't understand you.

 
Code
[IntrabarOrderGeneration = true]

variables:
	timeNow(0),
	t1(0),
	t2(0);

timeNow = SecondsFromDateTime(ComputerDateTime) + MillisecondsFromDateTime(ComputerDateTime / 1000);

t2 = t1;
t1 = timeNow;

plot1(t1);
plot2(t2);
For this code, t1 change on every change of the price level.
t2 only change when new bar 1 minute is formed.

I can't understand this.


Reply With Quote
  #13 (permalink)
nivi
Madrid, Spain
 
Posts: 30 since Feb 2017
Thanks Given: 4
Thanks Received: 6


Now I Undernstand. I am working on new code.


Reply With Quote
  #14 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

Hi nivi,

this might be helpful to you, too: https://www.multicharts.com/trading-software/index.php/IntraBarPersist

Regards,

ABCTG


nivi View Post
Now I Undernstand. I am working on new code.


Follow me on X Reply With Quote




Last Updated on August 14, 2018


© 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