Hi all, could you please give me a detailed example of code for an EA that can change the background colour of a chart when the price passes a certain level? I know it's done with ChartRedraw, ChartApplyTemplate functions,
I can't get it to work (for 3 days), I guess I don't understand something somewhere. Maybe there is a more simple solution. Thank you in advance.
Hi all, could you please give me a detailed example of code for an EA that can change the background colour of a chart when the price passes a certain level? I know it's done with ChartRedraw, ChartApplyTemplate functions,
I can't get it to work like that (for 3 days now), I guess I don't understand something somewhere. Maybe there is a more simple solution. Thank you in advance.
Where's your code? And what does it have to do with the above functions?
Hi all, could you please give me a detailed example of code for an EA that can change the background colour of a chart when the price passes a certain level? I know it's done with ChartRedraw, ChartApplyTemplate functions,
I can't get it to work (for 3 days), I guess I don't understand something somewhere. Maybe there is a more simple solution. Thanks in advance.
Open the Help:
CHART_COLOR_BACKGROUND - the background colour of the chart.
//+------------------------------------------------------------------+ //| Функция получает цвет фона графика. | //+------------------------------------------------------------------+ color ChartBackColorGet(constlong chart_ID=0)
{
//--- подготовим переменную для получения цвета long result=clrNONE;
//--- сбросим значение ошибки ResetLastError();
//--- получим цвет фона графика if(!ChartGetInteger(chart_ID,CHART_COLOR_BACKGROUND,0,result))
{
//--- выведем сообщение об ошибке в журнал "Эксперты" Print(__FUNCTION__+", Error Code = ",GetLastError());
}
//--- вернем значение свойства графика return((color)result);
}
//+------------------------------------------------------------------+ //| Функция устанавливает цвет фона графика. | //+------------------------------------------------------------------+ bool ChartBackColorSet(constcolor clr,constlong chart_ID=0)
{
//--- сбросим значение ошибки ResetLastError();
//--- установим цвет фона графика if(!ChartSetInteger(chart_ID,CHART_COLOR_BACKGROUND,clr))
{
//--- выведем сообщение об ошибке в журнал "Эксперты" Print(__FUNCTION__+", Error Code = ",GetLastError());
return(false);
}
//--- успешное выполнение return(true);
}
1. Bought a robot. Activated it on one PC. Can I install the Expert Advisor on other terminals on the same PC by simply copying a file in the directory of another MT4? (I was told that the file is not displayed in another copy).
2. I have bought an indicator on the Market, I want to embed it as a resource in an EA and place the EA for sale in the Market. I want to put it as a resource on the EA and post it on the Market. Is this possible?
3. I have a couple of users who buy one EA for five, then they give each other a password from their account and put the EA on other PCs. How can we protect against this? Is this allowed by Market rules?
Sergey Likho: 3. Users buy one EA for five people, then give each other the password to the account and put the EA on other PCs. Is there any way to protect against this? Is it allowed by Market Rules?
Is it really necessary? The more activations they eat. The faster they will buy it again (if the product is worth it). Secondly. On your product, each of those who installed it can earn money by using it to buy a version for personal use, so they do not have to depend on anyone. So the stick has two ends. Maybe you should not be greedy
Artyom Trishkin: Where's your code? And what does this have to do with the above functions?
Thanks for the answer, but I can not install these functions and codes, not offered by Taras (I am a novice). If you can explain in detail or suggest a site with a step-by-step on the subject. Thank you. The code attached.
Some symbols may not appear on Market Watch, but still be selected.
bool
SYMBOL_VISIBLE
Indicates that the selected symbol is displayed on Market Watch.
Some symbols (usually cross rates, which are necessary for calculating margin requirements and profit in the deposit currency) are selected automatically, but usually are not displayed in Market Watch. To display such symbols, you should select them explicitly.
Hi all, could you please give me a detailed example of code for an EA that can change the background colour of a chart when the price passes a certain level? I know it's done with ChartRedraw, ChartApplyTemplate functions,
I can't get it to work (for 3 days), I guess I don't understand something somewhere. Maybe there is a more simple solution. Thank you in advance.
Hi all, could you please give me a detailed example of code for an EA that can change the background colour of a chart when the price passes a certain level? I know it's done with ChartRedraw, ChartApplyTemplate functions,
I can't get it to work like that (for 3 days now), I guess I don't understand something somewhere. Maybe there is a more simple solution. Thank you in advance.
Hi all, could you please give me a detailed example of code for an EA that can change the background colour of a chart when the price passes a certain level? I know it's done with ChartRedraw, ChartApplyTemplate functions,
I can't get it to work (for 3 days), I guess I don't understand something somewhere. Maybe there is a more simple solution. Thanks in advance.
Open the Help:
Questions on the marketplace:
1. Bought a robot. Activated it on one PC. Can I install the Expert Advisor on other terminals on the same PC by simply copying a file in the directory of another MT4? (I was told that the file is not displayed in another copy).
2. I have bought an indicator on the Market, I want to embed it as a resource in an EA and place the EA for sale in the Market. I want to put it as a resource on the EA and post it on the Market. Is this possible?
3. I have a couple of users who buy one EA for five, then they give each other a password from their account and put the EA on other PCs. How can we protect against this? Is this allowed by Market rules?
Is it really necessary? The more activations they eat. The faster they will buy it again (if the product is worth it). Secondly. On your product, each of those who installed it can earn money by using it to buy a version for personal use, so they do not have to depend on anyone.
So the stick has two ends. Maybe you should not be greedy
Where's your code? And what does this have to do with the above functions?
Can you give me a hint?
int ticket;
ticket=OrderSend(.....);
if (ticket<0) {
int err=GetLastError();
PrintFormat("OrderSend failed with code %d : %s",err,ErrorDecriptions(err) ); // или Alert("Косяк блин"); чтобы всплыло со звоном и треском
}
How can I programmatically add an instrument to the Market Watch?
SYMBOL_SELECT
An indication that the symbol is selected in Market Watch.
Some symbols may not appear on Market Watch, but still be selected.
bool
SYMBOL_VISIBLE
Indicates that the selected symbol is displayed on Market Watch.
Some symbols (usually cross rates, which are necessary for calculating margin requirements and profit in the deposit currency) are selected automatically, but usually are not displayed in Market Watch. To display such symbols, you should select them explicitly.
bool