[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 153 1...146147148149150151152153154155156157158159160...432 New comment [Deleted] 2013.02.13 09:02 #1521 Sepulca: You can try this as a quick fix:You get a file like this:To stop adding to the file, you must manually delete the global variable STEP. Thanks Sepulca! I'll give it a try. Viktar Dzemikhau 2013.02.13 11:52 #1522 The question is this:How do I set the values of the elements of an array if it has many elements?At the moment I have the following working version:On the global level, it is declared as follows:int g_maPeriod[2];In init():g_maPeriod[1] = i_fastMaPeriod; g_maPeriod[2] = i_slowMaPeriod;But this is if only 2 external parameters. The tutorial says that you can only assign values to an array element by element, which is what I did.Why can't it be done, for example, like this?g_maPeriod[2] = {i_fastMaPeriod,i_slowMaPeriod};After all, if it's declared globally, it can be done this way:g_maPeriod[2] = {10,21};This is allowed, but when variables are passed toinit() instead of numeric values, it's not... It's strange. What's new in MetaTrader why the value of [ARCHIVE!] Any rookie question, Boris1209 2013.02.13 15:04 #1523 advise if there is an advisor that would close all trades on a chart [Deleted] 2013.02.13 17:03 #1524 boris1209: advise if there is an advisor that would close all trades on a chart Go to Files: close.mq4 2 kb Евгений 2013.02.13 17:15 #1525 pako: at script "close first market order if it is first in the list" [Deleted] 2013.02.13 17:24 #1526 Roll: script "close first market order if it is first in the list" Files: _closeallbuysell.mq4 2 kb closeallorders.mq4 3 kb closealllosses.mq4 3 kb closeallprofit.mq4 3 kb _closeorders.mq4 8 kb Dimka-novitsek 2013.02.13 17:46 #1527 Good afternoon! I don't understand, everything seems to be in order, but it won't put a position.if (OrderType()==OP_BUY) { BPrice6=0; Price_SELL=Bid- Dist*Point; TP_SELL= ( Price_SELL-TP*Point); SL_SELL= (Price_SELL+ SL*Point); Print ( " Bid " , Bid ," Price_SELL " , Price_SELL ," TP_SELL " , TP_SELL ," SL_SELL " , SL_SELL ); Sleep(2000); RefreshRates();for( A=25;A>=0;A--){if(IsTradeAllowed())break; if(A==0) Comment(" эксперту не разрешено торговать или поток для выполнения торговых операций занят "); } tycc=OrderSend (Symbol( ), OP_SELLSTOP, Lot*3*K ,NormalizeDouble(Price_SELL, Digits), 5, NormalizeDouble( SL_SELL,Digits), NormalizeDouble( TP_SELL,Digits), NULL, 450, 0, CLR_NONE); Error=GetLastError(); errorcomment = "Ошибка открытия ордера SELLSTOP " + " " + Symbol() + " " + ErrorDescript(Error); Print (errorcomment); Sell_закрылся_по_TP=0;2013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_understanding_Alex_WearwolfTry GBPUSD,H4: Bid 2.0611 Price_SELL 2.0511 TP_SELL 2.0226 SL_SELL 2.07112013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_Alex_WearwolfTry GBPUSD,H4: OrderSend error 4051 PipMaker v1 - Price Any rookie question, so [ARCHIVE] Any rookie question, Alekseu Fedotov 2013.02.13 18:13 #1528 Dimka-novitsek:Good afternoon! I don't understand, everything seems to be in order, but it won't put a position.2013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_Alex_Wearwolf try GBPUSD,H4: Bid 2.0611 Price_SELL 2.0511 TP_SELL 2.0226 SL_SELL 2.07112013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_Alex_WearwolfTry GBPUSD,H4: OrderSend error 4051 Comment text, parameter 8. "NULL" in quotes.something like this. Dimka-novitsek 2013.02.13 18:16 #1529 Thanks!!!! Let's have a look! Dimka-novitsek 2013.02.13 18:18 #1530 But I have NULL without inverted commas everywhere, and everywhere it goes? 1...146147148149150151152153154155156157158159160...432 New comment
You can try this as a quick fix:
You get a file like this:
To stop adding to the file, you must manually delete the global variable STEP.
The question is this:
How do I set the values of the elements of an array if it has many elements?
At the moment I have the following working version:
On the global level, it is declared as follows:
In init():
But this is if only 2 external parameters. The tutorial says that you can only assign values to an array element by element, which is what I did.
Why can't it be done, for example, like this?
g_maPeriod[2] = {i_fastMaPeriod,i_slowMaPeriod};After all, if it's declared globally, it can be done this way:
This is allowed, but when variables are passed toinit() instead of numeric values, it's not... It's strange.
advise if there is an advisor that would close all trades on a chart
advise if there is an advisor that would close all trades on a chart
Go to
at
script "close first market order if it is first in the list"
Good afternoon! I don't understand, everything seems to be in order, but it won't put a position.
2013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_understanding_Alex_WearwolfTry GBPUSD,H4: Bid 2.0611 Price_SELL 2.0511 TP_SELL 2.0226 SL_SELL 2.0711
2013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_Alex_WearwolfTry GBPUSD,H4: OrderSend error 4051
Good afternoon! I don't understand, everything seems to be in order, but it won't put a position.
2013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_Alex_Wearwolf try GBPUSD,H4: Bid 2.0611 Price_SELL 2.0511 TP_SELL 2.0226 SL_SELL 2.0711
2013.02.13 19:15:37 2007.11.15 08:55 Version_dynamic_with_Alex_WearwolfTry GBPUSD,H4: OrderSend error 4051
Comment text, parameter 8. "NULL" in quotes.
something like this.