What to do with unprofitable positions? - page 7

 
Vladimir Karputov:

Connected with read rights, current version 1.002.

Change history:

ds


Need to connect own channel

 
Alexey Volchanskiy:

You have to connect your own channel


You can make two iCustoms and in the input parameters a flag to select the desired indicator. And if the numbering of the buffers does not match - make changes too. What is the best way to do it?

 
Vladimir Karputov:

You can make two iCustoms and in the input parameters a flag to select the desired indicator. And if the numbering of the buffers does not match - make changes too. What's the best way to do it?


I would do it through conditional compilation.

 
Alexey Volchanskiy:

I would do it through conditional compilation.


I'll try it and send you the code. See if it's okay. - you'll paste it in.

 
Alexey Volchanskiy:

I'll try it and send you the code. See if it's OK. - you'll paste it in.


You have my permission to edit it. And, by the way, post it here, too - let people watch.

 
Here's a thought: what if you just close all your positions on the first week of each month? That way you can close all positions with negative profits.
 
Vladimir Karputov:
Here's a thought: what if you just close all your positions on the first week of each month? That way all positions can be closed with negative profits.

Why? At least explain your thoughts.
 
Vladimir Karputov:
Here's a thought: if you just close all of your positions at the first week of every month? So we may close all positions with negative profit.

Alexey Volchanskiy:

Why? At least explain your thoughts.

Well, if we work according to version 1.002 - in OnTradeTransaction we close ALL profitable positions, which are opposite to DEAL_ENTRY_IN, then unprofitable positions will accumulate. So I decided how to get rid of unprofitable positions: what if we simply close ALL positions at the beginning of the month - to cut the tails, so to speak. Then start all over again - from an open list, so to speak.

 
Vladimir Karputov:


Well, if we work according to version 1.002 - in OnTradeTransaction we close ALL profitable positions, which are opposite to DEAL_ENTRY_IN, then unprofitable positions will accumulate. So I decided how to get rid of unprofitable positions: what if we simply close ALL positions at the beginning of the month - to cut the tails, so to speak. Then start all over again - with an open list, so to speak.

Why not at the end of the week?
 
khorosh:
Why not at the end of the week?

It probably depends on the timeframe used: for example on M1 there will be a lot of trades and you can close at the end/beginning of the day, on larger timeframes there will be less trades and therefore you will need to close less often.


By the way, here is a video for a linear regression indicator: you can also use it for a channel. You can even detect the direction of the channel:


i-Regr
i-Regr
  • votes: 15
  • 2016.10.28
  • Vladimir Karputov
  • www.mql5.com
i-Regr — индикатор для MetaTrader 5. Канал Регрессии: Линейный Канал Регрессии, Канал квадратичной (параболической) регрессии, Канал кубической регрессии.