Multicurrency advisor question - page 5

 

Perhaps your question is too difficult, goldtrader/

Let's wait a little longer.

In the meantime I have a question. Before I post my questions here, I spend long hours trying to find the answers myself. Sometimes I do. But here's the difficulty again. It's all about that five-minute limit.

There was an explanation:

" Kadak wrote (a): Suggestion for Organizers: to test multicurrency EAs, addIsTesting() function to EA code and test in single currency mode (for each currency separately). This will give us the possibility to check the Expert Advisor for absence of trading errors and for "sinking".

Organizer's answer:

"This should be done by an EA writer. A simple construct like if ( IsTesting() && UseSymbol != Symbol() ) return; will solve all the problems ;) "

-------------------------------------------------------------------------------------------

My Expert Advisor's code structure is EXACTLY as follows

//---- input parameters---------
 
ЗАДАЕМ ВНЕШНИЕ ПАРАМЕТРЫ ПО КАЖДОЙ ПАРЕ
 
int init()
  {
   return(0);
  }
int deinit()
  {
   return(0);
  }
 
int start()
  {  
 
int Orders=OrdersTotal ();     //получаем кол-во открытых ордеров
if (Orders<3)                 //если  открытых ордеров <3
  { 
if (выключатель 1 вкл) {РАСЧЕТ ИНДЮКОВ И ОТКРЫВАЕМ ПЕРВУЮ ПАРУ } 
if (выключатель 2 вкл) {РАСЧЕТ ИНДЮКОВ И ОТКРЫВАЕМ ВТОРУЮ ПАРУ } 
... ... ... 
if (выключатель N вкл) {РАСЧЕТ ИНДЮКОВ И ОТКРЫВАЕМ ПОСЛЕДНЮЮ ПАРУ }  
  }
//========================================================================
for (int x=0; x<OrdersTotal(); x++)                                             {
    if (OrderSelect(x, SELECT_BY_POS, MODE_TRADES)) 
{       
if (UseTrailing 1) - ТРЕЙЛИНГ ПЕРВОЙ ПАРЫ
... ... ...
if (UseTrailing N) - Трейлинг последней пары
}
//======================================================================
   return(0);
  }

And now we have to insert here some way -

if ( IsTesting() && "GBPJPY" != "GBPPY" ) return;

if ( IsTesting() && "GBPUSD" != "GBPUSD" ) return;

if ( IsTesting() && "USDCHF" != "USDCHF" ) return;

if ( IsTesting() && "EURUSD" != "EURUSD" ) return;

My repeated attempts were not successful. There are only two lines about this function in Help.

Please tell me how to do it.

 
"GBPUSD" != "GBPUSD" -- there is no such thing, that's why it doesn't work. See developers' reply.
//
string UseSymbol;
...
UseSymbol = Symbol();
...
if (IsTesting() && (UseSymbol != "GBPUSD") { ToDo }
...
 

Thank you, alexjoi.

I'll be looking at....

 
alexjou, can you not answer my question (post before)?
 
Sounds about right, at least off the top of my head. You can also try such a monster:
H = iHigh("USDJPY", PERIOD_H4, iHighest("USDJPY", PERIOD_H4, MODE_HIGH, 50, 1))
in general:
H = iHigh(SymbolName, TimeFrame, iHighest(SymbolName, TimeFrame, MODE_HIGH, Shift, StartPosition));
Maybe we can do without cyclic brute force. But I'm not responsible for this because I use these functions very rarely and don't know all their peculiarities.
 
alexjou:
Sounds about right, at least on the surface. ...


THANK YOU. Checked it out, your design works and it's more economical.

Ignorance of details is more than compensated by knowledge of general patterns. Respect.

 

Hi.

Could you please tell me if the rules state that the maximum number of orders is 3. In case of multicurrency EAs this applies to each of the pairs traded or to all of them together?

for example my EA will trade 3 orders on each pair, but to minimise the drawdown it is working on three pairs, so the total number of lots traded at the same time will be 9, i.e. with 0 lot. 5, the margin will be approximately 5000 (i.e. about 50%).

 

That's not really the point of the post. Who knows, though. Discovered a pattern on pound pairs (and not only). Sadly. - Sad for us...

I optimized my Expert Advisor from January 1, 2007. 2007 up to July. For August the test was satisfactory too - outside the optimization period. Then I have run it through the history. from 2006 and even earlier.

It is losing. But it leaks in a strange way. Almost all pairs are leaking until the end of September - beginning of October last 2006.

In other words, until the beginning of the championship. And then it suddenly went up! Let me remind you that I have been optimizing my pairs since Jan. 2007г. I don't think that the market has "changed", as many people think. Perhaps, the matter is in the quotes' feed. However, my Expert Advisor is not a scalping one. The stops are from 60 to 130 pips. But where is the guarantee that the quotes will not be different since the beginning of October?

What are your thoughts? Who may have similar observations? I can lay out the balance charts if anyone doubts.

There is also one more question. The Expert Advisor of GBPCHF pair is losing money outside the optimization period. It is losing so much that it takes my breath away!

Working timeframe. - н4. Stops are 60 and more. How realistic it is to get profit using this pair with excessive spread. What to consider? What to consider? Who has conducted such an experiment?

 
GameOver:

Hi.

Could you please tell me if the rules state that the maximum number of orders is 3. In case of multicurrency EAs, does this apply to each of the traded pairs or to all of them together?

for example, my EA operates with 3 orders on each pair, but it works with three pairs to reduce the drawdown. i.e. the total number of lots traded at the same time will be 9, with 0.5 lot a margin of about 5000 (i.e. about 50%).


GameOver, this applies to all at once. No more than three orders (including pending orders) should be in the market at the same time

It does not matter whether it is on one pair or on different ones. AND NOT MORE THAN 5 LOTS IN EACH ORDER.

This is where we should start from.

 
rid:


GameOver, this applies to all at once. There should not be more than three orders (including pending orders) in the market at the same time

It does not matter if it is the same or different pairs. AND NO MORE THAN 5 LOTS IN EACH ORDER.

This is where we should start from.


Oh my god... What is the point of a multi-currency EA then? Because it is based on the price, no pending? Even a simple stop and reverse for 2 pairs is already 4 orders!

would have written "we do not accept multi-currency EAs" then

:-(

Reason: