[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 102

 
I was interested in changing the start and end values of a variable in a loop at the same time, but now I guess I have to convert everything to the number of variants of the start and end values and parse them through a switch. Not good at all.
 
Can you tell me how to calculate the lot size to open with, say, 10% of available funds?
 
MikeZTN >> :
Can you tell me how to calculate the lot size to open with say 10% of available funds?

see here: 'My First Grail'

 

Good morning, everyone. Can you tell me please?

If I have done in my EA the following:

High_=High[ Highest("EURCHF_FX",PERIOD_M15,MODE_HIGH, Cbar,0)];
Low_=Low[ Lowest("EURCHF_FX",PERIOD_M15,MODE_LOW, Cbar,0)]; 

Ask_ = MarketInfo("EURCHF_FX" ,MODE_ASK);
Bid_ = MarketInfo("EURCHF_FX",MODE_BID);
Point_ = MarketInfo("EURCHF_FX",MODE_POINT);  
 
АТР = iATR("EURCHF_FX",PERIOD_M15, Per_ATR,0);
OpenTime = iTime("EURCHF_FX",PERIOD_M15,0);


Then, in absolutely all the code I replaced the bits, asks, symbol, timeframe as above.

The EA has been working (i.e. it has been designed to work) at tf=m15 and it only takes data from m15.

I have optimised it on this timeframe.

Should this EA be able to replay it on the same history and perform a TEST on another timeframe with the same result as at m15?

//---------------------------------

As far as I know it should. Because it works with all ticks and takes data only from m15.

But here, the results do not add up...

 
Rita писал(а) >>

replace double High[] with
double iHigh( string symbol, int timeframe, int shift)
и
double Low[] replace with
double iLow( string symbol, int timeframe, int shift)
specify period PERIOD_M15
Read help!
Highest is an old function! Now it is(
int iHigheststring symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
 

Okay. I'll replace it. Although it works in the way I have it.

But what about the answer to my question ?

 
Rita писал(а) >>

Should this EA show the same result on the same story when running in the Tester on another TF as it did on m15 ?

If you set High[] and Low[] then it should not (but I haven't tried it, maybe you will become a pioneer and tell me later what's up!)

Array time series, containing maximal prices of each bar of current chart.

 
vvavva >> :
replace double High[] by
double iHigh(string symbol, int timeframe, int shift)
и
double Low[] replace with
double iLow(string symbol, int timeframe, int shift)
specify period PERIOD_M15
Read help!
Highest is an old function! now it is(
int iHigheststring symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)

good evening!

Pozh. tell me (who can), how can I

High_=High[ Highest("EURCHF_FX",PERIOD_M15,MODE_HIGH, Cbar,0)];
Low_=Low[ Lowest("EURCHF_FX",PERIOD_M15,MODE_LOW, Cbar,0)]; 

in my EA, redo them

as above?

High_= iHigh(...............);
Low_=  iLow(................); 



 
Rita >> :

Please tell (who can), how can I change the obsolete functions in my EA to the way it was described above?

Help: In the process of further development of MQL4 some functions have been renamed and moved from one group to another for systematization purposes. The old names of the functions are not highlighted and are not related to the MetaEditor's help. The old names of the functions can be used, as the compiler will understand them correctly. However, we strongly recommend to use the new names.

Other than changing the name nothing has changed, just add an "i" in front, the rest is unchanged.

Highest(...)>>iHighest(...)

 
granit77 >> :

Just add "i" in front, nothing else has changed.

Highest(...)>>iHighest(...)

Thank you. It worked.

I still don't understand.

Why when I run an EA on m5, I get the same result.

Hbid_= High[iHighest("EURUSD_FX",PERIOD_M5,MODE_HIGH, Cbar,0)];
Lbid_= Low [iLowest("EURUSD_FX",PERIOD_M5,MODE_LOW, Cbar,0)]; 

When I use the same parameters and the same history to test it on m15, the result is different!

Because absolutely all the indulators, etc. iTime("EURCHF_FX",PERIOD_M5,0) have been customized for m5!

Why are the tests different?

And what should I do to keep them the same?

Reason: