What to do with unprofitable positions? - page 6

 
Alexey Volchanskiy:

and then throw them all away laughing? ))

We get more of them and declare ourselves bankrupt).
 

Created a project.

Connecting everyone who wants to.

 
Vladimir Karputov:

Created a project.

Connecting everyone who wants to.


What kind of project?

 
Alexey Volchanskiy:

What kind of project is it?


Projects - MetaEditor.

 
Vladimir Karputov:

Projects - MetaEditor.


I've been doing everything in projects for two years now, I've written. What exactly is your project? I've only seen in the first posts about setting pendants. Is that the essence of the project?

In order to connect, you need to know what we are going to do.

 
Alexey Volchanskiy:

I've been doing everything in projects for two years, I told you. What's your project exactly? I've only seen in the first posts about setting pending orders. Is that the essence of the project?

In order to connect, you need to know what we are going to do.


The essence of the project: there is a channel (built using my indicator), pending orders are placed along the top and bottom; we will fight positions that have negative profit.

 
Vladimir Karputov:

The essence of the project: there is a channel (built by my indicator), at the top and bottom we put pending orders; struggle with positions that have a negative profit.


I am interested in this, I am dealing with this issue myself.

Is this project an unsourced project or what?

 
Alexey Volchanskiy:

OK, hook me up, it's interesting to wrestle, I'm doing it myself.

Is the project open-source or what?


The code is open, except for the indicator (the channel indicator can always be replaced with any other one - call via iCustom).

Connect?

 
Vladimir Karputov:

The code is open, except for the indicator (the channel indicator can always be changed to any other indicator - call via iCustom).

Shall I connect it?


Yes, let's see what happens.

 
Alexey Volchanskiy:

Yes, let's see what happens.


Plugged in with read rights, current version 1.002.

Change history:

/*
1.001:
   - работаем только на новом баре
      - если кол-во отложенных ордеров равно 0 -> выставляем Buy Limit и Sell Limit по значению iCustom на баре #0
      - если кол-во отложенных ордеров равно 1 -> удаляем отложенный ордер и заново заходим в OnTick()
   - в OnTradeTransaction, если идёт наращивание позиций -> потихоньку увеличиваем лот (++ min lot), а для противоположной позиции объём сбрасываем в min lot
   - в OnTradeTransaction закрываем ВСЕ позиции, которые противоположны сделке DEAL_ENTRY_IN
1.002:
   - БЫЛО: в OnTradeTransaction закрываем ВСЕ позиции, которые противоположны сделке DEAL_ENTRY_IN
   - СТАЛО: в OnTradeTransaction закрываем ВСЕ ПРИБЫЛЬНЫЕ позиции, которые противоположны сделке DEAL_ENTRY_IN
*/

ds