Hi, everyone and MetaQuotes!
Please, who can help me with this: after the update with build 625, i cant use any script, because, i think, my scripts not working correct. The fact is this: when i launch a script nothing happened on the screen or with my orders, but, when i tried to re-open the same script or to open another one, i`m asked if i want to close / or not the firs script already opened. I recompiled the script / scripts - nothing new happened. there are not error in `expert / journal`. I erased the scripts and download its again - the same action. I download more then 10 another scripts from codebase.mql4.com - the same. I download another MetaTrade 4 from another broker with import of the scripts - nothing change. I always restart the platform or even pc after every download.
Thanking you in anticipation!
show some code and someone will try to help you
The scripts i used are:
- `DROP_PENDING_SELL.mq4` from https://www.mql5.com/en/code/9667;
- `DROP_PENDING_BUY.mq4` from https://www.mql5.com/en/code/9666;
- `Modify_BUY-SL-TP.mq4` and `Modify_SELL-SL-TP.mq4` from https://www.mql5.com/en/code/10835;
- `PZ_DeleteAllPendingOrders.mq4` from https://www.mql5.com/en/code/10832.
Thank you!
Remove all the underscore signs "_" in the names of the inputs. It is possible that scripts are not working simply because that sign is no longer allowed in the variable names. I colored them red for you to see. Do that in every script you have.
#property show_inputs //#property show_confirm extern double Lots = 0.1; extern int Slippage = 3; extern int Stop_Loss = 20; extern int Take_Profit = 20; //+------------------------------------------------------------------+ //| script "Open a new Buy Order" | //+------------------------------------------------------------------+ int start() { double Price = WindowPriceOnDropped(); bool result; int cmd,total,error,slippage; //---- int NrOfDigits = MarketInfo(Symbol(),MODE_DIGITS); // Nr. of decimals used by Symbol int PipAdjust; // Pips multiplier for value adjustment if(NrOfDigits == 5 || NrOfDigits == 3) // If decimals = 5 or 3 PipAdjust = 10; // Multiply pips by 10 else if(NrOfDigits == 4 || NrOfDigits == 2) // If digits = 4 or 3 (normal) PipAdjust = 1; //---- slippage = Slippage * PipAdjust; double stop_loss = Price + Stop_Loss * Point * PipAdjust; double take_profit = Price - Take_Profit * Point * PipAdjust; if(Bid > Price) { result = OrderSend(Symbol(),OP_SELLSTOP,Lots,Price,slippage,stop_loss,take_profit,"",0,0,CLR_NONE); } if(Bid < Price) { result = OrderSend(Symbol(),OP_SELLLIMIT,Lots,Price,slippage,stop_loss,take_profit,"",0,0,CLR_NONE); } //---- return(0); } //+------------------------------------------------------------------+
Thank you, pro!
Unfortunately, still not working!
Remove all the underscore signs "_" in the names of the inputs. It is possible that scripts are not working simply because that sign is no longer allowed in the variable names. I colored them red for you to see. Do that in every script you have.
I'm still using the underscore with no problems. In fact if you look at the example codes in the documentation, they are littered with variables including underscores
I guess "what they say" and "what they do" do not match then. Sorry.
I`m using those scripts for at least one year, without any problems. Thanks anyway.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, everyone and MetaQuotes!
Please, who can help me with this: after the update with build 625, i cant use any script, because, i think, my scripts not working correct. The fact is this: when i launch a script nothing happened on the screen or with my orders, but, when i tried to re-open the same script or to open another one, i`m asked if i want to close / or not the firs script already opened. I recompiled the script / scripts - nothing new happened. there are not error in `expert / journal`. I erased the scripts and download its again - the same action. I download more then 10 another scripts from codebase.mql4.com - the same. I download another MetaTrade 4 from another broker with import of the scripts - nothing change. I always restart the platform or even pc after every download.
Thanking you in anticipation!