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

 
 
Has anyone seen a programmed mesanic trading system on 3 Edler screens when working on hourly charts. Please share the file.
 
rid >> :

Here you can look at closing positions...

http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=select&id=4

Thanks.... - I haven't looked through everything yet, but a couple of advisers helped me out:) If you can't do it yourself, here's a little something...)

 

Hello.

Can you tell me something? The trailing stop (for sell trades) is set to :

OrderModify(OrderTicket(),OrderOpenPrice(),Ask+ TrailingStop*Point,OrderTakeProfit(), 0, Blue);

This is not what I want to do. Instead of a new Stop Loss value

Ask+ TrailingStop*Point
I put : (OrderOpenPrice()-OrderProfit()/2 )

Like this:

OrderModify(OrderTicket(),OrderOpenPrice(),(OrderOpenPrice()-OrderProfit()/2 ),OrderTakeProfit(), 0, Blue

However, the log gives me error 130 or error 4051 (Invalid function parameter value)

Why? What have I done wrong here. The stoplevellers are respected.

Moreover, if I replace OrderProfit()/2 with a constant, e.g. TrailingStop*Point, themodification works without errors.


 
Rita писал(а) >>

Hello.

Can you tell me something? The trailing stop (for sell trades) is set to :


I need to do otherwise . Instead of a new stop loss

I insert : (OrderOpenPrice()-OrderProfit()/2 )

Like this:

However, the log gives me error 130 or error 4051 (Invalid function parameter value)

Why? What did I do wrong here. The stopgaps have been respected.

Note, if I replace OrderProfit()/2 with a constant, e.g. TrailingStop*Point, themodification works without errors

It would be better to convert the profit to points. It is in the currency of the deposit.

We should check the obtained value for the stop loss and round it (value).

It is better to check it in order not to place it closer than permitted by brokerage companies.

It is easier to take the average between the current price and the open one.

 
Vinin >> :

Profit should preferably be expressed in pips. It is in the currency of the deposit.

We should check the obtained value for the stop loss, and it is desirable to round it (value).

It is easier to take an average value between the current price and the opening price.

What kind of profit are you talking about?
The stopgaps have been respected. - That's what I said in my post.
//-----------------------------

I don't need an average value. I.e. I will need OrderProfit()/n values in the future


 
Rita писал(а) >>

What kind of profit are you talking about?
The stopgap has been respected. - I wrote about it in my post.
//-----------------------------

I don't need an average value. I.e. I will need OrderProfit()/n values in the future.

With prices, it's not hard to implement. But it's up to the owner. I won't insist.

 

Can you suggest an EA that deletes pending deals, after one of the pending deals triggers, only to ignore open deals, and triggers only if a new deal opens after the pending deal triggers?

I don't know what to do about it. http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=31 here is a good EA but it deletes pending deals immediately if there is an open deal on a pair, maybe it's possible to do something with it or just change settings.


And there is another EA which removes pending orders after any deal closing on a pair (ips, sl, trawl, manual close)
 
Vinin >> :

With prices, it's not hard to implement. But it's up to the owner. I won't insist.

But how to implement it with bik and ask prices?

Can you give me a hint with a code example?

 
Rita писал(а) >>

And how do you implement this with bik and ask prices?

Can you give me a code example?

double CalculateStopLoss(int OP, int N){
    double RetVal=0;
    double tmpStopLoss;
    double StopLevel= MarketInfo(Symbol(),MODE_STOPLEVEL);
    if ( OP==OP_BUY) {
       tmpStopLoss=(Bid-OrderOpenPrice())/ N;
       if ( StopLevel> tmpStopLoss/Point) tmpStopLoss= StopLevel*Point;
       RetVal=NormalizeDouble(OrderOpenPrice()+ tmpStopLoss,Digits);
    }
    //   Отработка остальных случаев
   return( RetVal);
}

This may not be the best way to go about it. Maybe someone will suggest a better one.

Actually it is a variant of percentage trawl.

Reason: