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);
|