Spread trading in Meta Trader - page 57

 
hippy писал(а) >>

If you want to use scripts with MAGIKOM when opening orders and set an EA with the same MAGIKOM, specify a profit in the EA and it will either close all orders with this MAGIKOM, or trawl in percentage.You should use MAGIKOM to write your own percentage of a spent order. The third is an EA, I found it in CODE BASE and changed it to close orders with specified MAGIKOM.When a profit of $10 is reached, the EA will close all orders with a specified MAGIKOM. When the price drops to -20%, i.e. to $8, the profit may rise further and the EA will close all orders until the price returns to the specified percentage.You should only leave your own orders when you have a good MAGIKOM in your hand and you don't need to open new ones.

hippy thank you, it seems to be the right thing now I will look into it.................................... If you have any more questions hope you can help?
 
AlexLep писал(а) >>
hippy thank you, seems like the right thing to do now I'll look into it.................................... Any more questions I hope you can help?

>> ask me, I'm always here to help if I can.

 
forex-k писал(а) >>

i think it is strange but this very pair brings the biggest profit

I don't know when they will converge back to zero; with oil the profit is smaller, but the drawdown is smaller and there will be a profit. I opened a gap between Brent and Light a couple of days ago and I have had 10-15 points profit and 30-40 points loss, but then they converge anyway.

 
hippy >>:

прибыль приносит,но один такой геп съест недельную или даже месячную прибыль,и неизвестно когда они обратно сойдутся хотя бы в ноль,а на нефти прибыль меньше,но и просадки меньше ипрофит по любому будет.наобум открыл по нефти брент и лайт сделки пару дней назад-и прибыль уже несколько раз была по 10-15 п и минус до 30-40 п,но потом они сходятся все равно

I don't argue that everything needs to be checked

 
rid >>:


//----------------------------------------------------------

п/с - Вот, кстати, - график "родственных контор" - Интелл+IBM, - тож есть над чем поэкспериментировать... -

(только надо следить за тикерами! - ибо Броко вчера преподнес сюрприз - ночью, когда мы с приятелем открыли "тандем" с (бай Интелл+ селл YHOO), - позиция по Яхо (в 00:05 мск)открылась с убытком = -33 !!!! - что сравнимо с максимальным дневным размахом движения цены по этим акциям. В техподдержке - нам, ухмыляясь, снизили этот убыток до "-16", - но это утешение слабое...)


Closed in the final profit ! Apparently, there's a reason to use the tandem further...!

Can be put into operation (not forgetting the tickers)!


 
hippy писал(а) >>

I'm always here to help if i can.

I have a good feeling about your scripts for opening/closing poses and EA with trawl.

It seems to be all convenient, but it seems to me there are a lot of actions to perform before opening a position. Maybe I've got it wrong, I'm not a good programmer ......................

For example: you see the opening situation of the first instrument on the chart - get into the script code - change the number of lots - set buy, then you open chart of another instrument - get into the script code - change the number of lots - set sell. This is because in this system it is necessary to open with different number of lots and fast.

As far as I understand the chart should be open to put an order. Of course, we may multiply several scripts with predefined lots, for both buy and sell, but I think it is not convenient and there is not enough "visible space" in the navigator. I may say I don't look at charts at all, only forex-k indicator on pairs I have combined.

For now I'm using this tool (in download) and I'm happy with it but my EA is not enough for closing profitable positions and trailing them.

I would like to ask you to attach the same EA for closing profitable positions as you have, + trailing opportunity to choose and maybe to cut the cowl at a certain loss.

I can read the info here https://www.mql5.com/ru/code/8561

If you could help, I would be very grateful.

Files:
multiorders.rar  234 kb
 
forex-k >>:
У каждой торговой системы есть свои минусы. Так вот самым большим минусом в этой системе является появление "висюков" т.е. при значительном отрыве одного инструмента от другого не факт что они смогут вернуться, индикатор то не показывает точно их общую уравновешенную стоимость а только за определенный период. Но при правильно подобранных лотах убытки не значительны по сравнению с прибылью. Даже при использовании советников для торговли висюки приходится закрывать вручную


I think the hangdogs should be closed when entering a reverse position. So it's a system with a takeprofit and an exit with a flip :-)

 
AlexLep писал(а) >>

hippy about your scripts for opening/closing positions and EA with trawl.

It seems to be all convenient, but it seems to me there are a lot of actions to perform before opening a position. Maybe I've got it all wrong, I'm a programmer of "x.....................

For example: you see the opening situation of the first instrument on the chart - get into the script code - change the number of lots - set buy, then you open chart of another instrument - get into the script code - change the number of lots - set sell. This is because in this system it is necessary to open with different number of lots and fast.

As far as I understand the chart should be open to put an order. Of course, we may multiply several scripts with predefined lots, for both buy and sell, but I think it is not convenient and there is not enough "visible space" in the navigator. I may say I don't look at charts at all, only forex-k indicator on pairs I have combined.

For now I'm using this tool (in download) to open positions for different symbols at the same time and I'm satisfied with it but my EA is not enough for closing profitable positions and trailing them.

I would like to ask you to attach the same EA for closing profitable positions as you have, + trailing opportunity to choose and maybe to cut the cowl at a certain loss.

I can read the info here https://www.mql5.com/ru/code/8561

If you can help, I would be very grateful.

i have a lot of different lots and magikami scripts and i'm used to working with them, the charts of working tools are always open. just add scripts to favorites, buy at the top and sell at the bottom and everything will be fine.

Files:
archive_3.zip  26 kb
 

Continuing to deal with the subject:

How the channel is built: if n (parameter #1) bars have not been breached, the channel narrows to a maximum in n bars.

Entry - when the channel is touched. Exit - by TP (parameter No. 2) or by the opposite signal. + Parameter 3 is an averaging period, but I do not think it is important.

Therefore, we have 3 parameters that can be optimized. All we have to do now is to assemble the optimizer and we can go to battle! :-)

 

Here's how I made a primitive simultaneous position opening script as a draft. You can add different magics if you wish

//+------------------------------------------------------------------+
//|                                                        Order.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
#property show_inputs

extern string buy;
extern string sell;
extern double lotbuy;
extern double lotsell;

int start()
  {
if (MarketInfo( buy, MODE_ASK)>0 && MarketInfo( sell, MODE_ASK)>0 &&
    MarketInfo( buy,MODE_TRADEALLOWED)>0 && MarketInfo( sell, MODE_TRADEALLOWED)>0)
{
   OrderSend( buy, OP_BUY, lotbuy, Ask, 2, 0, 0, 0, 0, 0, 0);
   OrderSend( sell, OP_SELL, lotsell, Bid, 2, 0, 0, 0, 0, 0, 0);
}
else
{
   if (MarketInfo( buy, MODE_ASK)==0) Alert("Ошибка в написании buy - ", buy);
   if (MarketInfo( sell, MODE_ASK)==0) Alert("Ошибка в написании sell - ", sell);
   if (MarketInfo( buy,MODE_TRADEALLOWED)==0) Alert("Закрыт рынок - ", buy);
   if (MarketInfo( sell,MODE_TRADEALLOWED)==0) Alert("Закрыт рынок - ", sell);
}  
   

   return(0);
  }