[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 88

 
I have an array which is stored in a text file whose data is used in Optimisations.
Does it need to be loaded every time (from one optimization to another), or can it be stored in memory and not access the file?
(referring to the file takes a relatively long time)
Thank you!
 
Folks, can you tell me how to make the moving average move backwards by 5 candles? With this option, my trades don't open...(.
EMA_Fast1=iMA(NULL,0,8,-5,1,PRICE_CLOSE,1);
 
- to the +, change it to the +.
 
ierehon:
Folks, can you tell me how to move the moving average backwards by 5 candles? This way my trades don't open...(...
EMA_Fast1=iMA(NULL,0,8,0,1,PRICE_CLOSE,5);
you can do this in your EA
 
sergeev:
- to the +, change it to the +.
Yes, but that's how it shifts forward, and I need it to shift backwards by 5 candles.
 
ierehon:
Yes, but that's how it shifts forward, and I need it to shift backwards by 5 candles.
then on the current bar (or rather on the last five) it would have no value at all.
 
alsu:
in the EA you can do this as well
i.e. are these two forms of recording identical for the EA? then how can i make an entry on their intersection? this is how the parameters of moving averages look like:
   EMA_Fast1=iMA(NULL,0,Fast_EMA_Period,-5,3,PRICE_CLOSE,1);
   EMA_Slow1=iMA(NULL,0,Slow_EMA_Period,0,3,PRICE_CLOSE,1);
   EMA_Fast2=iMA(NULL,0,Fast_EMA_Period,-5,3,PRICE_CLOSE,2);
   EMA_Slow2=iMA(NULL,0,Slow_EMA_Period,0,3,PRICE_CLOSE,2);
 
ierehon:
i.e. are the two forms of recording identical for the EA? then how do you make an entry on their intersection? this is what the moving average parameters look like
Decide what you want the output to be. If the value of the machine is 5 bars backwards, then
iMA(NULL,0,8,0,1,PRICE_CLOSE,5);

or identical

iMA(NULL,0,8,5,1,PRICE_CLOSE,0);

If so,

iMA(NULL,0,8,-5,1,PRICE_CLOSE,2);
iMA(NULL,0,8,-5,1,PRICE_CLOSE,1);

it will always be EMPTY_VALUE, because there is no moving average on these bars

 
chief2000:
I have an array which is stored in a text file whose data is used in Optimisations.
Does it need to be loaded every time (from one optimization to another), or can it be stored in memory and not access the file?
(Referring to the file takes a relatively long time)
Thank you!

You can't. You can manually score the data from the array to the array inside the EA if it doesn't change from optimization to optimization, for the duration of the tests.
 
alsu:
Decide what you want the output to be. If the value of the machine is 5 bars backwards, then

or identical

If so,

it will always be EMPTY_VALUE, as there is no shifted wrist on these bars

Best of all, don't bother with shifts in the EA, just take the shift 0 and the number of the bar you want.
Reason: