[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 633
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
Can you tell me if there is any way to dump more than 4 MB of code here (or to dump it here in parts?) ?
All my code I created in five years is 22 megabytes. That's several thousand indicators, expert advisors and scripts
My code is 15 kB (mq4 file size), but when I try to send it (using the srs link in the string with the tools), I get a message that my message exceeds the size and the message is not sent. The line below says that the maximum file size is 4 MB, so I figured that somehow the processing of my question, there is an increase in the size of the file.
Use the link below Attach file
Use the link below Attach file
This task requires clarification:
Igor and Viktor, thank you very much!
Please, help me to understand:)
How to move a pending order?
Tried deleting it first and putting a new one in, but it doesn't work
int NewOrder(int Cmd,double Lot){
...
TP=PR+TakeProfit*Point;
SL=PR-StopLoss*Point;
Proverka();tic=OrderSend(Symbol(),Cmd,Lot,PR,5,TP,SL,0,1,0,CLR_NONE);
if(tic<0) {Print("Order open error: ",GetLastError());
return(0);}
//+------------------------------------------------------------------+
void Proverka()
{
for(int i=1; i<=OrdersTotal(); i++) // Order loop
{
if (OrderSelect(i-1,SELECT_BY_POS)==true)
{
if (OrderSymbol()!= Symbol()) continue;
if (OrderType() == OP_BUY || OrderType() == OP_SELL) continue;
int tic=OrderTicket();
OrderDelete(tic); Print("Delet",tic);
}
}
}
//+------------------------------------------------------------------+
Please help me to understand:)
How do I move a pending order?
I tried to delete and put a new one, but it didn't work.
If your order type does not change, you can move it by selecting it by OrderTicket(), using the OrderModify() function, where you specify the new open and STOP prices.
...And the values of variables passed to trading functions need to be normalized (price, STOP). And this loop of order enumeration:
it would be better to replace it with the reverse one:
StopLosses are also not organized correctly:
Stops will be calculated differently for different types of pending orders.
TIP: If you still have difficulties yourself, get ANY kind of Expert Advisor working with pending orders and take from it either functions for working with orders or calculations of their STOPPs.
If your order type does not change, it can be moved by selecting OrderTicket() with the OrderModify() function, where you specify the new opening price and STOP values.
...And the values of variables passed to trading functions need to be normalized (price, STOP). And this loop of order enumeration:
it would be better to replace it with the reverse one:
StopLosses are also not organized correctly:
Stops will be calculated differently for different types of pending orders.
Hello! Please help me to understand:
How does the virtual trailing stop work?
How is it better than a regular trailing stop?
Can I prescribe a virtual trailing stop in my Expert Advisor if there are many orders at the same time for each pair, and will that be rational?