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

 

Chiripaha:

... When I switch from one timeframe to another, all settings are reset to basic.

Is it possible to avoid this moment? How do I do it? I have searched the forum, I have not found anything.

Judging by the lack of answers - the question is either too stupid or there is no answer. Or, alternatively, it is wrongly asked.

Correct me if anything.

 
tpg_k156:
Good afternoon. I am interested in one question: is it possible to install two Metatraders in parallel, but without screwing up the first one. Are there likely to be conflicts between them. What are the peculiarities of their setting? I need such a thing for simultaneous monitoring of a pair of accounts without any reconnecting manipulations.
Need to put the terminals in different folders - so you can put as many as you like. There will be no conflicts or glitches.
 
Where would it be more correct to insert a function to check for trade
if( IsTradeAllowed() != true ){ return(0); }
Int start() or int init() ?
 
ruslanchik:
Where would it be more correct to insert a function to check for trade
Int start() or int init() ?
As you wish (in the sense of "the author knows best") !!! BUT - if you think about it... :)
 

Here is the function:

  for (int i=0; i<2; i++)
   {
      signal[i] = SIGNAL_NO;
      
  //    if (UseFiltrMa == false && A > B) continue;
      if (1-ое условие) 
          if (2-ое условие)
          {
            signal[i] = SIGNAL_BUY;
          }

There was a function with condition 1 and condition 2. Everything works. Now I need to somehow add a condition to the code, which I commented out. Here's the gist:

There is an external boolean variableUseFiltrMa. IfUseFiltrMa is in True, this filter is taken into account, i.e. conditionA > B, and ifUseFiltrMa is in False, it is not taken into account. How can this be done?

The difficulty is that the condition must be exactly in this position. Not somewhere else.

 
Chiripaha:

Judging by the lack of answers - the question is either too stupid or there is no answer. Or, alternatively, wrongly asked.

Correct me if that's the case.

Try unchecking "Disable EA on profile change" in the settings, see if that helps.
 
hoz:

Here is the function:

There was a function with condition 1 and condition 2. Everything works. Now I need to somehow add a condition to the code, which I commented out. Here's the gist:

There is an external boolean variableUseFiltrMa. IfUseFiltrMa is in True, this filter is taken into account, i.e. conditionA > B, and ifUseFiltrMa is in False, it is not taken into account. How can this be done?

The difficulty is that the condition must be exactly in this position. Not somewhere else.

Why put the signal in the array at all? - For training purposes??? The signal can be BUY and SELL at the same time??? :)))
 
TarasBY:
Why put the signal in the array at all? - For training purposes??? The signal can be BUY and SELL at the same time??? :)))

No. Just signals with different magik. So a bunch of wipes... the signal under different conditions has different magic. It's simple there. Everything works actually. But I decided to add another filter. Now I'm logically stuck... That's why I'm asking.
 
hoz:

No. Just signals with different magics. So a pack of mash-ups... the signal under different conditions has a different magik. It's simple there. Everything works really well. But I decided to add another filter. Now I'm logically stuck... That's why I'm asking.

This condition somehow changes in the loop:

//    if (UseFiltrMa == false && A > B) continue;
...If not, why put it inside the loop?
 
TarasBY:
Why do we need to include the signal into the array? - For training purposes? Can a signal be BUY and SELL at the same time? :)))


No. Just signals with different magik. So a bunch of wipes... the signal under different conditions has different magic. It's simple there. Everything works really well. But I decided to add another filter. Now I'm logically stuck... That's why I'm asking.

TarasBY:
Can a signal be BUY and SELL at the same time? :)))

Actually, yes, somehow as soon as there is a signal, it opens immediately. There can be many orders at the same time. Each one has a stop and TP. But there can be no limit on the number of orders. Again, this is set by the external variable.