[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 343

 
Thank you so much, it worked ))))))) Soon my computer will be chopping cabbage without my presence )))) The system has been tested for years and is now being automated
 
PapaYozh:

it's better this way:

a matter of taste...
 
khorosh:
Is it possible to read the values of a smoothing average, manually applied in a separate window of any indicator, using the Previous Indicators option? If so, how?
I think iMAOnArray will solve the problem, but previously in the Expert Advisor you should organize a cycle of adding the indicator data to the array.

I cannot do it directly.

P.S.
Perhaps, it is easier to add iMAOnArray directly in the indicator.

 
granit77:
I think that iMAOnArray will solve the problem, but first, you must arrange a loop in the Expert Advisor for entering the indicator data array.

You can't do it directly.

P.S.
Perhaps, it is easier to add iMAOnArray directly in the indicator.

I have done it with iMAOnArray, I know it. But the data of this MA applied manually is stored in the terminal somewhere so I thought it would be possible.
 
Price=NormalizeDouble(Bid-Otstup*Point-sell*Step*Point,Digits);
            _SLoss=NormalizeDouble(Ask-Otstup*Point-sell*Step*Point+SLoss*Point,Digits);
         tiket[i]=OrderSend(Symbol(),OP_SELLSTOP,0.01*Lots,Price,3,_SLoss,0,"",10001,0,Green);

In the tester it says: 22:19:10 2011.11.15 00:02 pips_probe EURUSD,M1: OrderSend error 130

I've been sick and tired to look for an error, stops seem to be correct.

 
myrzila:

In the tester it says: 22:19:10 2011.11.15 00:02 pips_probe EURUSD,M1: OrderSend error 130

I've tried to look for an error, stops seem to be correct.


After the OrderSend() command is executed, write the following:

if(GetLastError()==130){
  Print("Price = ",Price,"  _SLoss = ",_SLoss);
}

and so on - print ALL parameters that are fed to the OrderSend() function input. Print will show which of the parameters is not calculated correctly.

 
myrzila:

In the tester it says: 22:19:10 2011.11.15 00:02 pips_probe EURUSD,M1: OrderSend error 130

I've been sick and tired to look for an error, stops seem to be correct.

But when I request it via MarketInfo(Symbol(),MODE_STOPLEVEL); - it shows StopLevel=0. How can it be?
 
myrzila:
But when I request it via MarketInfo(Symbol(),MODE_STOPLEVEL); - it shows StopLevel =0. How can it be like this?


Spreads have narrowed :) - The market has become sluggish.

What I don't like about dynamically changing spreads is that they have to be tracked on every tick.

 
drknn:


Spreads have narrowed :) - the market has become sluggish.

What I don't like about dynamically changing spreads is that they have to be tracked on every tick.

How can spreads be taken into account when setting a stop loss?
 
myrzila:
and how can spreads be taken into account when placing a stop loss?


If the spreads change, the minimum allowable distance for placing pending orders and placing stop orders will also change.

int MinLevel=MarketInfo(Symbol(),MODE_STOPLEVEL);
This should be written inside the "start" function. Then it will be checked on every tick and if the minlevel has changed, it will be reflected in the variable.
Reason: