[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 31
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Where can I find an EA which places, deletes or modifies an order, TP or SL at a certain price?
As long as timeseries are one-dimensional arrays, the MAs will also only work on one-dimensional arrays. When the price graph becomes three-dimensional...
A two-dimensional array is needed to store the rows used in calculations. It seems that we can't do without a loop with copying into a one-dimensional array.
I've written a function to move all stops to the same level, but in the end each of the open orders closes at its own stop loss, which was specified at opening, i.e. I guess the stops are not moved anywhere, what could be the problem?
void OrModSL(string period)//function to move stop to lower fractal of 15-minute chart
{if(period=="M15")//if period H1
{
for(int i=OrdersTotal()-1;i>=0;i--)
{
RefreshRates();
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) && OrderType()==OP_BUY)//if the last buy order type
{
OrderModify(OrderTicket(),OrderOpenPrice(),dnfrM15,OrderTakeProfit(),0,Blue);
}
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) && OrderType()==OP_SELL)
{
OrderModify(OrderTicket(),OrderOpenPrice(),upfrM15,OrderTakeProfit(),0,Blue);//if the last order sell
}
}
}
return(0);
}
Good afternoon!
Can you please tell me why when I test the Expert Advisor and set different periods in the settings I get different results?
On the indicators the periods are clearly set. ex: double iRSI_0 = iRSI( Symbol(), PERIOD_M5, 9, PRICE_CLOSE, 0 ) ;
One more question... I download quotes via archive of quotes, but in the first minutes of almost every day there is a sharp fall of 100 pips. (i.e. the data is not usable).
What can it be related to and where can I get correct quotes?
Thank you in advance!
Good evening all!
Can you tell me how to make FileHandle add data to the file without deleting the previous one?
I did it like this: FileHandle=FileOpen(FileName,FILE_CSV|FILE_READ|FILE_WRITE,";"); ... Deletes the previous data from the file, while writing the new ones.
Thank you!
Good evening all!
Can you tell me how to make FileHandle add data to the file without deleting the previous one?
I did it like this: FileHandle=FileOpen(FileName,FILE_CSV|FILE_READ|FILE_WRITE,";"); ... Deletes the previous data from the file, while writing the new ones.
Thank you!
Where is all the code? Maybe you don't move the file pointer?
At the end of the script I put
if (FileHandle>0) FileClose(FileHandle);
Maybe I don't need to close it?
Where is all the code? Maybe you don't move the file pointer?
I'm not quite sure what you mean by "move the file pointer"?
From a complete beginner
I would like to take historical data from external source and from MT4, convert it to Exel then derived function back to MT. The method of export from Exel is suggested by https://forum.mql4.com/ru/44307 Now mock a question: How do I execute
Point 3 - "Open offline chart in the following format "!Eqv+Symbol Name+,+M+Variable TicksInBar".
And then step by step, by way of practice, how do I get the pre-exported quotes from MT to Exel back to MT in this way?
Thank you