NexusFi: Find Your Edge


Home Menu

 





RangeBarTime indicator does not return seconds, only minutes. Suggestions?


Discussion in Platforms and Indicators

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




 
Search this Thread

RangeBarTime indicator does not return seconds, only minutes. Suggestions?

  #1 (permalink)
 MBAGearhead 
Chicago, IL
 
Experience: Advanced
Platform: OpenECry
Trading: Crude Oil, Soybeans
Posts: 22 since Nov 2010
Thanks Given: 22
Thanks Received: 12

I'm hoping someone can provide some feedback on an indicator coding issue. How do I get .EL code in OEC to call upon the seconds it takes a bar to form? See attached and below. OEC is unable to provide support beyond importing an indicator and recommends I hire a developer.

Code for RangeBarTime.el:
---------------------------------------------------
variables:
V1(0), TimePlot(0);

//Can't get any of these functions to work right (unsupported by OEC?):
//LastCalcTime
//CurrentTime
//SecondsFromDateTime
TimePlot = SecondsFromDateTime(Time[0]) - SecondsFromDateTime(Time[1]);
//This TimePlot should work but doesn't. it always equals zero.

//Adjust for when a new hour begins
V1 = Time[0]-Time[1];
If V1 >= 40 then
V1 = V1-40;

//Adjust for when a new day begins
If Time[0]>0000 AND Time[0]<0800 AND Time[1]<2400 AND Time[1]>1200 then
V1 = V1+2400;

Plot1( V1, "Time");
//this plots how many new minutes began during each price bar.
//I really want how many new seconds began during each price bar!

If V1 <= 1 then
Setplotcolor(1,Green);
If V1 > 1 and V1 <= 3 then
Setplotcolor(1,Yellow);
If V1 > 3 then
Setplotcolor(1,Red);

Attached Thumbnails
Click image for larger version

Name:	RangeBarTime2.png
Views:	210
Size:	40.4 KB
ID:	173105  
Started this thread Reply With Quote




Last Updated on January 27, 2015


© 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