NexusFi: Find Your Edge


Home Menu

 





MillisecondsFromDateTime


Discussion in MultiCharts

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




 
Search this Thread

MillisecondsFromDateTime

  #11 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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 Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
About a successful futures trader who didnt know anythin …
Psychology and Money Management
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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 Twitter Reply With Quote




Last Updated on August 14, 2018


© 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