Good evening! I noticed that you have a big library of ready-made codes. Perhaps you have some code which would determine the opening price of the previous bar at the moment of creating a new one? Regards, Vladimir.
Good evening! I noticed that you have a rich library of ready-made codes. Perhaps you have some code which would determine the opening price of the previous bar at the moment of creating a new one? Regards, Vladimir.
For example, the result of the work of the Expert Advisor is the price of a bar in the previous bar.
For example, from this function - the Expert Advisor's result is worse
//+------------------------------------------------------------------+//| Expert new tick handling function |//+------------------------------------------------------------------+voidOnTick(void)
{
staticdatetime limit_time=0; // last trade processing time + timeout//--- don't process if timeoutif(TimeCurrent()>=limit_time)
{
//--- check for dataif(Bars(Symbol(),Period())>2)
{
//--- change limit time by timeout in seconds if processedif(ExtExpert.Processing())
limit_time=TimeCurrent()+ExtTimeOut;
}
}
}
//+------------------------------------------------------------------+
I don't even understand what I've messed up here, but the Expert Advisor gives a better result relying on poking.
//+------------------------------------------------------------------+//| Expert new tick handling function |//+------------------------------------------------------------------+voidOnTick(void)
{
staticdatetime limit_time=0,ExtTimeOut=0; // last trade processing time + timeout//--- don't process if timeout
limit_time=iTime(Symbol(),Period(),0);
if(ExtTimeOut==limit_time)
return;
//--- change limit time by timeout in seconds if processedif(ExtExpert.Processing())
ExtTimeOut=limit_time;
}
//+------------------------------------------------------------------+
All have their own vision on entering and exiting the locks. Advisors that I have come across on the way then worked askew then suddenly deleted the order, then suddenly put it is not clear on what principle.
would like to write myself but can not understand the programming . take the advice and decided to open a separate branch .
working conditions for the advisor
1.itself does not trade all transactions manually (buy and sell)
in the pending order set take in min + (possibility to adjust)
3. When the pending order triggers --- another pending order is set at the level of 1 order (ie total should be equal)
4. if the price returns and forms a lock --- then all the takei are removed.
The only difference is in the shape of the deal --- it looks like the opening of the position on the left side and the opening of the position on the right side.5 When opening any part of the lock opens pending on the volume equal to this part. the movement after 15 -20 points (adjust), ie if I open buy, pending for buy and vice versa.
like everything. glad for any suggestions. If such a miracle appears in the light will be posted for all who are interested in it with open source code. for mt4.
Hello Gentlemen Developers! I am disabled 1g, after a stroke. And it is simply impossible for me to write an owl myself due to circumstances. Need a fairly simple bot. What would open the pose from the levels I have created. I have no stops, only opposite deals. Algorithm interesting please help. The second bot will be the bomb, and the news will be unique, all purely my development .
This idea has been sitting in my head for a long time. I tried to do it manually, but I get confused. I am sure there is no such algorithm anywhere in trading (point 3).
1. The Expert Advisor opens orders on each breakdown of a candle High - Buy, Low - Sell.
2. TP is equal to one ATR on a working timeframe.
3. After the order is closed on the TP, the Expert Advisor takes the most unprofitable order and 30% of the TP of the closed order (to be printed in the variables of the Expert Advisor)
Trawl the TP of the losing order into the negative zone (following the principle of first taking then giving up a profit percentage)
and thus it leads the loss-making order to its closing with a loss. Then it finds the most unprofitable order again and continues to modify it until it is closed with a loss.
In each such series, we will get at least 60% profit taking into account the swap and commissions.
It works then it doesn't... (It may not work at all)
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 07.10.2006 |//| Описание : Возвращает номер бара экстремума ЗигЗага по его номеру. |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента (NULL или "" - текущий символ) |//| tf - таймфрейм ( 0 - текущий ТФ) |//| ne - номер экстремума ( 0 - последний) |//| dp - ExtDepth |//| dv - ExtDeviation |//| bs - ExtBackstep |//+----------------------------------------------------------------------------+int GetExtremumZZBar(string sy="", int tf=0, int ne=0, int dp=12, int dv=5, int bc=3) {
if (sy=="" || sy=="0") sy=Symbol();
double zz;
int i, k=iBars(sy, tf), ke=0;
for (i=0; i<k; i++) {
zz=iCustom(sy, tf, "ZigZag", dp, dv, bc, 0, i);
if (zz!=0) {
ke++;
if (ke>ne) return(i);
}
}
Print("GetExtremumZZBar(): Экстремум ЗигЗага номер ",ne," не найден");
return(-1);
}
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 07.10.2006 |//| Описание : Возвращает экстремум ЗигЗага по его номеру. |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента (NULL или "" - текущий символ) |//| tf - таймфрейм ( 0 - текущий ТФ) |//| ne - номер экстремума ( 0 - последний) |//| dp - ExtDepth |//| dv - ExtDeviation |//| bs - ExtBackstep |//+----------------------------------------------------------------------------+double GetExtremumZZPrice(string sy="", int tf=0, int ne=0, int dp=12, int dv=5, int bs=3) {
if (sy=="" || sy=="0") sy=Symbol();
double zz;
int i, k=iBars(sy, tf), ke=0;
for (i=1; i<k; i++) {
zz=iCustom(sy, tf, "ZigZag", dp, dv, bs, 0, i);
if (zz!=0) {
ke++;
if (ke>ne) return(zz);
}
}
Print("GetExtremumZZPrice(): Экстремум ЗигЗага номер ",ne," не найден");
return(0);
}
TOTAL : "Back and forth ADX" March April indicator - not successful for some reason
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Here's the indicator itself
Here is a better result - added filter (MA and RSI)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
With 0.10 lot
Here is a better result - added filter (MA and RSI)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
With Lot 0.10
Good evening! I noticed that you have a big library of ready-made codes. Perhaps you have some code which would determine the opening price of the previous bar at the moment of creating a new one? Regards, Vladimir.
Good evening! I noticed that you have a rich library of ready-made codes. Perhaps you have some code which would determine the opening price of the previous bar at the moment of creating a new one? Regards, Vladimir.
For example, the result of the work of the Expert Advisor is the price of a bar in the previous bar.
For example, from this function - the Expert Advisor's result is worse
I don't even understand what I've messed up here, but the Expert Advisor gives a better result relying on poking.
Good evening! I am self-taught and I take codes from examples and achieve the task set for myself by the method of scientific poking.
For example, from this function - the result of the expert is worse
and here I myself don’t understand what I cheated - but by poking, the expert shows the result better.
Here you can check the difference - replace only the example above with the post
- in this EA
Here's a way to check the difference - replace only the example post above
- in this expert.
Thank you! I will give it a try! Regards, Vladimir.
would like to write myself but can not understand the programming . take the advice and decided to open a separate branch .
working conditions for the advisor
1.itself does not trade all transactions manually (buy and sell)
2.If the deal closes in + then the pending order is deleted.
in the pending order set take in min + (possibility to adjust)
3. When the pending order triggers --- another pending order is set at the level of 1 order (ie total should be equal)
4. if the price returns and forms a lock --- then all the takei are removed.
The only difference is in the shape of the deal --- it looks like the opening of the position on the left side and the opening of the position on the right side.5 When opening any part of the lock opens pending on the volume equal to this part. the movement after 15 -20 points (adjust), ie if I open buy, pending for buy and vice versa.
like everything. glad for any suggestions. If such a miracle appears in the light will be posted for all who are interested in it with open source code. for mt4.
Help in finding the last ZigZag signal
By condition if the last up-sell, Dn-buy.
It works then it doesn't... (It may not work at all)
Help in finding the last ZigZag signal
By condition if the last up-sell, Dn-buy.
It works then it doesn't... (It may not work at all)