Trailing funds function (equity) - has anyone come across a ready-made one? - page 2

 

A similar complex is lying around in the works, but I can't get a description of it here.

ZS. and what I threw yesterday did not fit?

 
KimIV писал (а) >>

Well, that's what it's called - StopVirtual. Volodya (Tartan), as far as I remember, is particularly fond of such things. Go to his forum. He must have some similar stuff.

No, it's a bit wrong, the closest to the solution is your EA, just change it a bit and add a trall according to the means, and it will be just what is needed, because the issue is not that I do not want the DC to see my stops - I have no idea where to put them (in general they stand where they are supposed to and let them stand), it is not real, because the portfolio... right think Comboat, for a portfolio it is necessary

 
This is all from the evil one. Stops, soberly, are placed based on an analysis of market conditions (for example, a channel break). And what do we have here? If our portfolio is not good - let's set our stops and let the market adjust to our portfolio?
 
Come on... talk about things you don't understand :)
 

Um. And if I don't understand anything at all, what should I do? Don't talk about anything at all? :)


Anyway, I've made my point. What's the background to your approach? You see, according to your idea, it turns out that one and the same trading strategy will work differently if the portfolio balance is $100.000 in one case and $10.000 in the other (all other conditions being equal). Equity stops are not the strength.

 
bstone писал(а) >>
It's all from the evil one. Stops are soberly placed, based on market analysis (e.g. breakthrough of a channel). And what do we have here? If our portfolio is not very good - let's set our stops and let the market adapt to our portfolio?

Well... why is that, let's say, a handshake, an action trade...

Since the evening (or early in the morning) you set a basket of positions in different instruments,

and this "trailing profit" is quietly watching the situation...

*

Experiments with trailing stop for each position,

i.e. using standard tools did not give good results...

But profit crawling back and forth led me to such realization of tracking.

*

Only one problem. Still it is only in the plans. :)))

I am using an Expert Advisor that closes when the profit reaches the specified value:

//+------------------------------------------------------------------+ 
//|                                                     CloseALL.mq4 | 
//|                                        Copyright © 2006, Fox Rex | 
//|                                                                  | 
//+------------------------------------------------------------------+ 
#property copyright "Copyright © 2006, Fox Rex" 
#property link      "" 

//---- input parameters 
extern double    Profit=100.0;// Профит в единицах баланса 
//+------------------------------------------------------------------+ 
//| expert initialization function                                   | 
//+------------------------------------------------------------------+ 
int init() 
  {return(0);} 
int deinit() 
  {return(0);} 
//+------------------------------------------------------------------+ 
//| expert start function                                            | 
//+------------------------------------------------------------------+ 
int start() 
  {
   if (NormalizeDouble(AccountProfit(),2)>= Profit) CloseOrders();
   return(0); 
  } 
//+------------------------------------------------------------------+ 
void CloseOrders() 
{ 
   for(int i=0; i<OrdersTotal(); i++) 
   { 
      if(!OrderSelect( i, SELECT_BY_POS))continue; 
      if(OrderType()==OP_SELL){OrderClose(OrderTicket(),OrderLots(),Ask,2,Red);continue;} 
      if( OrderType()==OP_BUY) {OrderClose(OrderTicket(),OrderLots(),Bid,2,Red);continue;}
   } 
}
//+------------------------------------------------------------------+

However, sometimes there are situations that when you close a large >8 number of positions

some of them still remain... :(

 
kombat писал(а) >>

Well... why is that, let's say, a handshake, an action trade...

Since the evening (or early in the morning) you set a basket of positions in different instruments,

and this "trailing profit" is quietly watching the situation...

*

Experiments with trailing stop for each position,

i.e. using standard tools did not give good results...

But profit crawling back and forth led me to such realization of tracking.

*

Only one problem. Still it is only in the plans. :)))

I am using an Expert Advisor that closes when the profit reaches the specified value:

However, sometimes there are situations that when you close a large >8 number of positions

some of them still remain... :(

Turn the counter upside down and add a close check.

 
bstone писал (а) >>

You see, following your idea, it turns out that the same trading strategy will work differently if in one case the portfolio balance is $100,000? and in the other $10,000 (all other conditions being equal). Equity stops are not the strength.

On the one hand, I understand you very well, because...

bstone wrote (a) >>

Um. And if I don't understand anything at all, what should I do? Don't know anything at all? :)

reason, of course, it's the way to learn :)

bstone wrote(a) >>

What is the background to your approach?

Hmmm... squeeze the maximum out of the portfolio :) but, as Kombat correctly pointed out, it's not always easy to do with standard stops, in my particular case - unrealistic, standard stops are engaged and clearly fulfil their purpose, they do not need and can not be touched, i.e. you can not :)
 

bstone писал(а) >>
Это как?
Типа если эквити просел, подтянуть его обратно к балансу? :)

the author meant rather the opposite when equity went too fast upwards from the balance line

to pull up the stops to Breakeven

If I'm reading the author's mind correctly.

bstone wrote(a) >>
You may try to use it to breakeven at least once in a while. Stops, in a sober way, are placed on the basis of market analysis (for example, breakthrough of a channel). And what do we have here? If our portfolio is not good - let's set our stops and let the market adjust to our portfolio?

you understand that you can use stops not only to take a loss but also to protect a profit

i think this is what the author meant

some TS have jumps of equity from the balance line

If you have an indicator, you may try to use it for Breakeven at least.

 
YuraZ >> :

the author meant rather the opposite when equity went too fast upwards from the balance line

to pull up the stops to Breakeven

if I'm reading the author's mind correctly.

No, it does not. The author himself said that his religion does not allow him to change the regular stops.


But he can use "virtual" stops by equity. I am an idiot, of course, but I do not see the difference. If you close using regular or virtual stops, the result will be the same.


Then the author says about trailing stops on equity, and Combat says that stops to the ass - give them tokens. In short, the enemy camp is a mess :)


The author's general idea is quite clear, but, as I said, I do not see any rational reasoning behind it. The author would like to save his profit and exit the market if equity had first increased by 20% and then began to decrease to 10%. So, the virtual stop loss was 10%. Yes, we earned 10% and we are happy.


But again, why didn't the TS close with standard stops? If it didn't close, it means that market analysis implied a possibility of some short-term unfavourable developments. Stops are the stops for exiting the market, if it is obvious that the working hypothesis about its conditions is not correct. And if not a virtual stop, the market would have slightly frightened by a pullback and would have gone upwards. The regular stops would have performed their job perfectly, but the virtual stop would have bitten off all the profits. So you can guess what would have been better.

Reason: