[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 217

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
InitsializeRealMasterOrders -- look for a fault here.
And here's another thing -- so as not to make bicycles -- https://docs.mql4.com/ru/convert/timetostr
at start - call the function to check if there is a buy order in the SellStop order loop... and remove it - if there is no buy order amongst the open orders...
see...
Round robin of set orders (start)
we take the order
- If it is a SellStop (remember its magic number - it is also a buy order ticket {
via
we check whether the order exists... - this is your buy order...
If it is not there, then we delete the current SellStop order
}
} End of order loop...
InitsializeRealMasterOrders -- look for a fault here.
And here's something else - not to make a bicycle - https://docs.mql4.com/ru/convert/timetostr
Still a glitch. In the subroutine the code reads data from the lines of the text document:
4;NZDUSD;98537467;1;0.5;1340809155;0;0.7881;0;0.7939;0;0
4;NZDUSD;98537450;1;0.5;1340809147;0;0.788;0;0.7939;0.787;0
The order open time is the sixth parameter in the line. It was read into the datetime type variable by the commands:
Stroka=FileReadString(FileHandle);// Open time
r_master_OpenTime[i]=StrToTime(Stroka);// Opening time
As a result, we got a God knows what value in variable r_master_OpenTime[i]. But as soon as I changed its type from datetime to int, everything is ok. I've been programming with mql4 for more than five years, and I still can't stop wondering... :)
see...
Round robin of set orders (start)
we take the order
- If it is a SellStop (remember its magic number - it is also a buy order ticket {
via
we check whether the order exists... - this is your buy order...
if it is not there - then delete the current SellStop order
}
End of order loop...
I wrote this nonsense
drknn: Все равно глюк. В подпрограмме код считывает данные из строк текстового документа:
4;NZDUSD;98537467;1;0.5;1340809155;0;0.7881;0;0.7939;0;0
4;NZDUSD;98537450;1;0.5;1340809147;0;0.788;0;0.7939;0.787;0
The order open time is the sixth parameter in the string. It was read into the variable of datetime type by commands:
As a result, the r_master_OpenTime[i] variable would contain an unimportant value. But as soon as I changed its type from datetime to int, everything is ok. I've been programming with mql4 for more than five years, and I still can't stop wondering... :)
Please advise what to do if:
In the tester is working fine, all according to plan, but on the realsk does not open the transaction.
P.S. Really need some help, it's a matter of life or death
Good day to all.
I have tried to write an indicator, it seems to work, but only on the history it draws as planned and then when new quotes come in it draws a usual mask.
The code is attached:
int start()
{
int counted_bars=IndicatorCounted();
int i,n;
double Stark=0;
//----
i=Bars-counted_bars-1;//+50;
// n=Bars-counted_bars-1;
while(i>=0)
{
//----
double Ma=iMA(NULL,0,PerMa,Shift,MODE_EMA,PRICE_CLOSE,i);
//double Ma1=iMA(NULL,0,PerMa,Shift,MODE_EMA,PRICE_CLOSE,i+1);
if(Stark+Step*Point<Ma)Stark=Ma;
if(Stark-Step*Point>Ma)Stark=Ma;
ABuf[i]=Stark;
//----
i--;
}
return(0);
}
Please help me to fix it so it will keep drawing steps.
I would really appreciate it.
Gek.