Make a list for TimeFrame?

To add comments, please log in or register
mattehalen
98
mattehalen  

How do i make a list

TimePeriod=0;
TimePeriod=1;
TimePeriod=2
TimePeriod=3;
TimePeriod=4;
TimePeriod=5;
TimePeriod=6;
TimePeriod=7;

0=NULL
1=1
2=5
3=15
4=30
5=60
6=240
7 =1440

zzuegg
1499
zzuegg  

hi, since i do not know what you try to do i suggest using a array:

double Timeperiod[8]={0,1,5,15,30,60,240,1440};   
then you can use it in your indicatos with Timeperiod[x]
mattehalen
98
mattehalen  
zzuegg:

hi, since i do not know what you try to do i suggest using a array:


I wanna inplant it in a EA and get to be external. I get this error message: "Timeperiod - external array not allowed"

what do i do wrong?

extern double  Timeperiod[8]={0,1,5,15,30,60,240,1440};
extern int     RSIPeriod=10;
extern int     MAOfRSIPeriod=10;
extern int     ATRPeriod=10;
extern int     MaxTradesAllowed=4;
extern double  TPFaktor=4;
extern double  SLFaktor=2;
extern bool    UseDelay=false;
extern double  DelayFaktor=0.5;
extern double  LotSize=0.1;
extern bool    CloseOnOpossingCross=true;
extern bool    buyFilter1=true;
extern double  buyFilter1.upperLimit=72;
extern double  buyFilter1.lowerLimit=50;
William Roeder
19998
William Roeder  
You can have extern arrays.
extern int TimePeriod1=1;
extern int TimePeriod2=5;
...
init can move them into an array if necessary.
To add comments, please log in or register