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:
Here, it turns out how useful it is to look at previously published: it turns out that indicator buffers (top and middle) were mixed up in places and in addition in the "Data Window" window there were no names of buffers. I made a change: the buffers are now positioned correctly: top, middle, bottom
You need to check the numbers of indicator buffers. Otherwise, besides getting a handle, you'll need to rewrite the function of getting data from the indicator as well.
Version 1.003 conditional compilation for two different indicators
Indicator selection block:
//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+enum ENUM_INDICATORS
{
automatic_channel_MT5 = 0, // Automatic channel MT5
hodrick_prescott_channel= 1, // Hodrick-Prescott Channel
};
...
input ENUM_INDICATORS InpIndi = automatic_channel_MT5;
...
//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+intOnInit()
{
...
//--- create handle of the indicator iCustomstring parameters="";
#ifndef parameters/*==automatic_channel_MT5*/switch(InpIndi)
{
case automatic_channel_MT5:
parameters="Market\\Automatic channel MT5";
break;
case hodrick_prescott_channel:
parameters="Downloads\\vhpchannel_02";
break;
default:
//---break;
}
#endif
handle_iCustom=iCustom(m_symbol.Name(),Period(),parameters);
//--- if the handle is not created if(handle_iCustom==INVALID_HANDLE)
Please check the call for getting indicator values: I am polling the UP (buffer number "0") and DOWN (buffer number 2) lines (for setting Sell Limit and Buy Limit respectively):
Version 1.003 conditional compilation for two different indicators
Indicator selection block:
Please check the call for getting indicator values: I am polling the UP (buffer number "0") and DOWN (buffer number 2) lines (for setting Sell Limit and Buy Limit respectively):
ds
I overdid it: #ifndef is not needed here at all. It's just enough to leave the switch.
1) We make a contract with a cellular operator for a "Toll Number". 2) Taking a loan from a bank, indicating that the number is for communication. 3) We do not pay the credit. 4) Collectors call your toll-free number around the clock. 5) Grab the dough in a shovel.
For the channel strategy (Sell Limit, But Limit) the unresolved issue is a lingering trend: during a lingering trend there is an accumulation of losing positions
So far I am fighting with such positions in one way: when a new position is opened (in this case it will be SELL) I close ALL opposite positions (ALL BUY).
1) You sign a contract with a pay-as-you-go operator. 2) Get a loan from a bank stating that number as our phone number. 3) Don't pay the credit. 4) Collectors call your toll-free number around the clock. 5) Grab the dough in a shovel.
)))
In 2005 a girl I knew managed to take out a loan of $40000. At that time Bulgaria was going to join the EU and the real estate was very cheap. She tried to persuade me to leave with her, she was not going to repay the credit.
She wanted to buy a house there and rent it out to tourists. And she got the credit because she was a teacher )) That's how teachers are.
Vladimir Karputov: What to do with unprofitable positions?
Let profits grow and REDUCE losses!!!
REDEASE THE LOSS!!! Close, exit....
There isno need to "work" with losses or do anything, decent or not, as soon as you realise you have made a mistake with your prediction (which is absolutely normal, typical) exit or roll over, losses are not porridge or a chair, you cannot "fix" or somehow correct the position APOSTERIORI, only wind it up, remember the lesson.
There isno need to "work" with losses or do anything, decent or not so decent, as soon as you realise you have made a mistake with your prediction (which is absolutely normal, typical) exit or roll over, a loss is not porridge or a chair, you cannot "fix" or somehow correct the position APOSTERIORI, only wind it up, remember the lesson.
The problem here is that it is not possible to determine exactly where the boundary is, when losses should be closed. After all, literally 1 pip after closing the price can reverse and the losing trade could make a profit. This is the situation that always kills you and you get discouraged. Apparently we should use the statistics of average trend (no-loss) movement by a pair. And taking this into account the decision to close the loss. More precisely, taking into account statistics the probability of the price reversal after N points.
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:
Here, it turns out how useful it is to look at previously published: it turns out that indicator buffers (top and middle) were mixed up in places and in addition in the "Data Window" window there were no names of buffers. I made a change: the buffers are now positioned correctly: top, middle, bottom
I would do it through conditional compilation.
What does it do?
I would do via conditional compilation.
You need to check the numbers of indicator buffers. Otherwise, besides getting a handle, you'll need to rewrite the function of getting data from the indicator as well.
You have to connect your channel
Version 1.003 conditional compilation for two different indicators
Indicator selection block:
Please check the call for getting indicator values: I am polling the UP (buffer number "0") and DOWN (buffer number 2) lines (for setting Sell Limit and Buy Limit respectively):
ds
Version 1.003 conditional compilation for two different indicators
Indicator selection block:
Please check the call for getting indicator values: I am polling the UP (buffer number "0") and DOWN (buffer number 2) lines (for setting Sell Limit and Buy Limit respectively):
ds
I overdid it: #ifndef is not needed here at all. It's just enough to leave the switch.
and then throw them all away laughing? ))
There's another option:
1) We make a contract with a cellular operator for a "Toll Number".
2) Taking a loan from a bank, indicating that the number is for communication.
3) We do not pay the credit.
4) Collectors call your toll-free number around the clock.
5) Grab the dough in a shovel.
)))
For the channel strategy (Sell Limit, But Limit) the unresolved issue is a lingering trend: during a lingering trend there is an accumulation of losing positions
So far I am fighting with such positions in one way: when a new position is opened (in this case it will be SELL) I close ALL opposite positions (ALL BUY).
There's also this option:
1) You sign a contract with a pay-as-you-go operator.
2) Get a loan from a bank stating that number as our phone number.
3) Don't pay the credit.
4) Collectors call your toll-free number around the clock.
5) Grab the dough in a shovel.
)))
In 2005 a girl I knew managed to take out a loan of $40000. At that time Bulgaria was going to join the EU and the real estate was very cheap. She tried to persuade me to leave with her, she was not going to repay the credit.
She wanted to buy a house there and rent it out to tourists. And she got the credit because she was a teacher )) That's how teachers are.
What to do with unprofitable positions?
Let profits grow and REDUCE losses!!!
REDEASE THE LOSS!!! Close, exit....Let the profits grow and REDUCE the losses!!!
CUT THE LOSSES!!! Close, get out...