Есть индикатор. В его аллерт необходимо встроить функцию нажатия клавиатуры
есть кусок скрипта
[SPOILER]
#include
#define VK_I 0x24
void start() {
int handle=WindowHandle(Symbol(),Period());
PostMessageA(handle,WM_KEYDOWN,VK_I,0);
}
Куда его всунуть в аллерте чтобы заработал?
[SPOILER]
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll();
//----
return(0);
}
void printmyline(double vala, int topbottom) //print target line
{
vala = NormalizeDouble(vala,4);
if(topbottom==1)//target
{
ObjectCreate("theentry " + vala,OBJ_HLINE,0,0,vala);
ObjectSet("theentry " + vala,OBJPROP_COLOR, Blue);
ObjectSetText("theentry " + vala,"Buy",13,"Arial",Black);
if (alert)
Alert("Buy",tf," ",Symbol());
text = StringConcatenate("Buy",13, tf," ",Symbol());
}
if(topbottom==2)//stop
{
ObjectCreate("thestop " + vala,OBJ_HLINE,0,0,vala);
ObjectSet("thestop " + vala,OBJPROP_COLOR, Blue);
ObjectSetText("thestop " + vala,"Buy",13,"Arial",Black);
}
#include
#define VK_I 0x24
void start() {
int handle=WindowHandle(Symbol(),Period());
PostMessageA(handle,WM_KEYDOWN,VK_I,0);
} Вот так не работает))
}
void printmylinedown(double vala, int topbottom) //print target line
{
vala = NormalizeDouble(vala,4);
if(topbottom==1)//target
{
ObjectCreate("theentry " + vala,OBJ_HLINE,0,0,vala);
ObjectSet("theentry " + vala,OBJPROP_COLOR, Red);
ObjectSetText("theentry " + vala,"Sell",13,"Arial",Black);
if (alert)
Alert("Sell",tf," ",Symbol());
text = StringConcatenate("Sell",13, tf," ",Symbol());
}
if(topbottom==2)//stop
{
ObjectCreate("thestop " + vala,OBJ_HLINE,0,0,vala);
ObjectSet("thestop " + vala,OBJPROP_COLOR, Red);
ObjectSetText("thestop " + vala,"Sell",13,"Arial",Black);
} #include
#define VK_Y 0x24
void start() {
int handle=WindowHandle(Symbol(),Period());
PostMessageA(handle,WM_KEYDOWN,VK_Y,0);
} И так тоже!
}
void deletealllines()
{
ObjectsDeleteAll();
}

