[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 382

 
DanLett:

People, which of the standard indicators can be used to identify a flat?

or rather which is the best of the standard ones... :)

Even two simple wizards can easily detect a flat.

It's enough to determine for yourself at which interval there should be no more than 1 or 2 of their crossovers.

 
double MarketInfo( string symbol, int type) 

This is from help, but is it possible to use NULL as a symbol, in order to "watch" only the instrument on which the EA works?

It's just we are planning several EAs of the same type on different pairs.

For example, like this:

MarketInfo(NULL,MODE_ASK)
 
moskitman:

This is from the help, but is it possible to use NULL as a symbol to "watch" only the instrument on which the EA is running?

Like this, for example:

NULL won't work it seems.

But Symbol() will work =)

 

Good afternoon. I have the following question. TheMQL4book located at MQL4.community, in the "Simple MQL Programs " section, contains an example of tradingexpert.mq4 with the following content (see attached file). External variables extern double StopLoss =200 and extern double TakeProfit =39 are declared in block 1-2. Block 8-9 calls of the New_Stop(StopLoss) and New_Stop(TakeProfit) functions are used to calculate SL and TP parameters. There is a description of the function in block 11-12.

Question: The formal parameter of New_Stop function has int type(int Parametr), while the parameters passed in function call New_Stop(StopLoss)(New_Stop(TakeProfit)) have double type... In MQL4 book, found at MQL4.community in "Language Basics" section, "Functions" subsection, "Function Properties" says "The number, type and order of parameters passed in a function call must match the number, type and order of formal parameters passed in the function description (the exception is a function call that has default parameters - see Function Call and Function Description and Return Operator. How to explain this contradiction: according to the latter, when declaring StopLoss and TakeProfit variables, I should have declared int type, not double(the compiler has not generated any error)?

In order not to litter the forum, thanks in advance for the answer.

Files:
 

Hi, can you give me a hint... I have searched through half of the internet, and the information varies

The essence of the Expert Advisor is to open positions on different instruments. "In real life, it works and shows the current prices, but I can't run it through history... The function returns zero.

I want to show current quote for two currencies EURUSD and EURCHF, for example.

I am calling the current quote with this function (I am following the history when EURUSD chart is active):

MarketInfo("EURUSD",MODE_BID) ---> get current price

MarketInfo("EURCHF ",MODE_BID) ---> returns zero

I've found on this forum that MarketInfo does not work on history, use "iClose".

But when I call quote using the

iClose("EURUSD",PERIOD_M1,0) ---> I get current price

iClose("EURCHF",PERIOD_M1,0) ---> it returns zero

How else can I get the current quotes for different instruments in the strategy tester? Thank you

 
faton:

The MT4 tester is not multi-currency. In other words, only single currency EAs can be tested.

 
moskitman:

The MT4 tester is not multi-currency. In other words, only single currency EAs can be tested.


thanks
 
faton:

thanks

More precisely, test on one tool and you can use other tools for analysis.
 
sergeev:


thanks for your help!))
 
DhP:

Or so it seems:

thank you for your feedback!!! very helpful!
Reason: