artsedge: I want to build in number of time period options to trade into my first code, is there an enumeration that could deal with a list of options. |
|
artsedge: I want to build in number of time period options to trade into my first code, is there an enumeration that could deal with a list of options. |
|
#define HR2400 (PERIOD_D1 * 60) // 86400 = 24 * 3600 int TimeOfDay(datetime when=0){ if(when == 0) when = TimeCurrent(); return( when % HR2400 ); } datetime DateOfDay(datetime when=0){ if(when == 0) when = TimeCurrent(); return( when - TimeOfDay(when) ); } //datetime Tomorrow( datetime when=0){ if(when == 0) when = TimeCurrent(); // return(DateOfDay(when) + HR2400); } //datetime Yesterday(datetime when=0){ if(when == 0) when = TimeCurrent(); // int iD1 = iBarShift(NULL, PERIOD_D1, DateOfDay(when) - 1); // return( iTime(NULL, PERIOD_D1, iD1) ); } OnStart(){ #define MIDNIGHT 0 #define NOON 43200 // 12 * 3600 int tod = TimeOfDay(); if(tod >= MIDNIGHT && tod < NOON){ ...
I want to build in number of time period options to trade into my first code, is there an enumeration that could deal with a list of options. Thanks for any advice !