Questions from Beginners MQL5 MT5 MetaTrader 5 - page 651
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Well, let's say the robot opens positions when everything happens on my computer... If I decide to move all my trades to a rented server ... just to turn off the PC and go to sleep)))) will my open positions and signals be transferred or the robot will start trading there from scratch?
It is easier to put the robot on the UPU and let it work there, and watch it from the computer. You have to pay by the month anyway, not by the hour.
If so, the robot will continue to trade there in the same style as it did not trade on UPU, but provided that the robot code does not work with global variables and it is not afraid of resetting the terminal in the process, otherwise there may be problems.
It is easier to put the robot on the UPU and let it work there, and watch it from the computer. You have to pay by the month anyway, not by the hour.
If that's how you want it, then the robot will continue to trade there in the same style as it did not trade on UPU, but provided that the robot code does not work with global variables and it is not afraid of restarting the terminal in the process, otherwise there may be problems.
Hello 2016.10.25_18:11 am MSC. A request to the moderators. I can't delete my CLose.mqh file program code . Just in case. So that no changes in the market will follow. As long as I'm not making any money yet. Otherwise I'll get tired of writing the next EA. Besides, my question has not been answered. I have fixed the exit outside the array myself. I still have the incorrect start index in the tester's log. But it has not prevented the Expert Advisor from closing trades. If you delete my file, I will thank you for it. That is all for now. 18:21 MSC.
6. I was also confused by "this function is beyond start"?
Need to add a point by condition to an old indicator written when everything was Start().
Beyond the tenth bar the fractal is not interesting.
The variable price_dnf always equals zero so I left Low with the bar index where the fractal was found.
As a result, there is a fractal but not a point.
What is wrong?
{
ExtMapBuffer3[i]=Low[i+1];
}
//======
//за пределами Start()
int isFractalDn()
{
for(int i=3; i <= 10; i++)
{if(iFractals(NULL, 0, MODE_LOWER, i)!= EMPTY_VALUE) return(i);
price_dnf=iFractals(NULL, 0, MODE_LOWER, i);
}
return(-1);
}
Need to add a point by condition to an old indicator written when everything was Start().
Beyond the tenth bar the fractal is no longer interesting.
The variable price_dnf always equals zero, so I left Low with index of the bar where the fractal was found.
As a result, the fractal is not even close to it but it sets a point.
What is wrong?
{
ExtMapBuffer3[i]=Low[i+1];
}
//======
//за пределами Start()
int isFractalDn()
{
for(int i=3; i <= 10; i++)
{if(iFractals(NULL, 0, MODE_LOWER, i)!= EMPTY_VALUE) return(i);
price_dnf=iFractals(NULL, 0, MODE_LOWER, i);
}
return(-1);
}
//| fraktal.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
double price_dnf;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
Print(isFractalDn());
Print(price_dnf);
}
//+------------------------------------------------------------------+
int isFractalDn()
{
for(int i=0; i<=30; i++)
{
if(iFractals(NULL,0,MODE_LOWER,i)!=0.0)
{
price_dnf=iFractals(NULL,0,MODE_LOWER,i);
return(i);
break;
}
}
return(-1);
}
//+------------------------------------------------------------------+
//| fraktal.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
double price_dnf;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
Print(isFractalDn());
Print(price_dnf);
}
//+------------------------------------------------------------------+
int isFractalDn()
{
for(int i=0; i<=30; i++)
{
if(iFractals(NULL,0,MODE_LOWER,i)!=0.0)
{
price_dnf=iFractals(NULL,0,MODE_LOWER,i);
return(i);
break;
}
}
return(-1);
}
//+------------------------------------------------------------------+
Thank you, but there is still no result.
After all, it is essentially the same condition.
if( High[i+1]==price_dnf)
Thank you, but there is still no result.
After all, it is essentially the same condition.
if( High[i+1]==price_dnf)
You do realise that it may be a rare occurrence for the maximum of one candle to coincide with the minimum of another?
And yes, of course, not on the whole story. Only on the one formed at the moment of the indicator's work. At least it seems that way, based on the piece of code you cited.
A simple question, but still... I searched through the Documentation but failed to find a clear answer.