Question for connoisseurs - page 17

 

What do you get if you write it like this?

Tiker  = Symbol()+"#I";
 
Thank you, I will try it now.
 
It all worked out ! Thank you again!
 

Alternative:

Tiker = StringConcatenate(Symbol(), "#I");
To quote the developers:

The StringConcatenate() function is faster and more memory-efficient than linking strings using addition (+) operations.

 

OK! I'll try that as well.

Here's another question. The design that draws the asc and bid lines of ticker #I on the main instrument chart is done as an EA.

I decided to change it into an indicator. I placed a line at the very beginning of the code

#property indicator_chart_window
However. When I try to put the resulting indicator on the mt4 chart I get an abrupt freeze !

I do not know why. Maybe this one line is not enough?

I remove the loop operator from the code.

// while(!IsStopped()) {//зацикливаем код советника
Then the hang goes away. But that's not the answer, of course.

Please tell me where the error is.

#property indicator_chart_window
//---Внешние параметры советника---
extern color  Сolor_AskTiker   = Lime;//цвет линии 
extern color  Сolor_BidTiker   = Aqua;//цвет линии 
extern int    WIDTH            = 1; //толщина линий
string    Tiker;
double Ask_Tiker, Bid_Tiker;
//-------------------------------------------
int init()
{
 ObjectCreate("lowline",OBJ_HLINE,0,0,0,0,0);
 ObjectCreate("highline",OBJ_HLINE,0,0,0,0,0); 
 ObjectSet("lowline", OBJPROP_BACK,1); 
 ObjectSet("highline", OBJPROP_BACK,1);
   }
//-------------------------------------------
int deinit()
{ObjectDelete("lowline"); ObjectDelete("highline");}
//-------------------------------------------------
int start() {
Tiker  = Symbol()+"#I";
while(!IsStopped()) {//зацикливаем код советника
 RefreshRates();
//Задаем цены аск и бид тикера
Ask_Tiker = MarketInfo( Tiker,MODE_ASK);
Bid_Tiker = MarketInfo( Tiker,MODE_BID);

//устанавливаем горизонтальные линии на ценах аск и бид
SetHLine( Сolor_AskTiker,"highline", Ask_Tiker,0 , WIDTH); //ф-я И.Кима
SetHLine( Сolor_BidTiker,"lowline" , Bid_Tiker,0 , WIDTH);

      Sleep(1000);  }//конец цикла
 }//Конец функции СТАРТ
 
Hello all! Help in this problem, 4 days digging the Internet looking for an indicator that puts pending orders in both directions on the appearance of a candle Doji (in which the distance of placing orders regulated), or in ready to write indicator function to the appearance of the red arrow and the appearance of candles Doji put out pending or broken levels, but at what distance, so you can change yourself. I have no idea how to change it. Thanks in advance!
Files:
cvkafo.mq4  5 kb
 
vitus >>:
Всем доброго времени суток!! Помогите в такой проблеме,Уже 4 е сутки перекапываю интернет ищу индикатор, чтоб ставил отложенные ордера в обе стороны по появлению свечи Doji заранее благодарю!!
http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=39
 
Question on I. Kim's script. (Good afternoon all.)

http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=46
Description:
The ByMarketBuy script is designed to quickly buy the current symbol at the current price. To use the script, put it in the ..\experts\scripts\ folder and assign a hotkey to it in the terminal navigator. By default, the script just buys with 0.1 lot and that is all. It does not place a stop or a take. But if one needs stop, take, magic and other lot size, one can set them directly in the script code by initializing global variables

//-------------------------------
Is it possible to open PROPERTIES window before accessing the chart, so I can set the required lots and magic number there (not in source code)?
If it is possible, how?

//-----------------------------------
Also, something does not open the script (stops=0, lot=0.1)).
In the log it says
2010.01.12 16:34:20 ByMarketBuy GCG0,M5: loaded successfully
but nothing else happens
 

Thanks a lot Rita for the tip, but I am interested in the indicator that puts pending orders in both directions on the appearance of candles Doji, that's the trick, or to add in ready-made :)

 
Rita >>:
Вопрос по скрипту И.Кима. (Добрый день всем)

http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=46
Описание:
Скрипт ByMarketBuy предназначен для быстрой покупки текущего символа по текущей цене. Для использования скрипт нужно положить в папку ..\experts\scripts\, а в навигаторе терминала назначить ему горячую клавишу. По умолчанию скрипт просто покупает лотом 0.1 и всё. Стоп и тейк не ставит. Но если кому-то нужны стоп, тейк, магик и другой размер лота, то их можно настроить прямо в коде скрипта инициализацией глобальных переменных

//-------------------------------
Нельзя сделать, так, чтобы перед тем как встать на график, сначала раскрылось окно СВОЙСТВА, чтобы я могла там (а не в коде исходника) задать нужные мне лоты и магик?
Если можно, то как?

//-----------------------------------
Кроме того, что-то не открывает позации скрипт(стопы=0, лот =0.1)).
В журнале есть надпись
2010.01.12 16:34:20 ByMarketBuy GCG0,M5: loaded successfully
но больше ничего не присходит

Add a command to the preprocessor at the beginning of the script code :

#property show_inputs

And it's up to you to decide what extern parameters you will set.

Reason: