décalage dans la trendline New comment Audrey Versace 2015.05.04 10:33 Bonjour, je me trouve face à un problème, j'ai un décalage important en Pips dans mes "Trendline", il faudrait que le cour soit exactement entre les deux "Trendline" et en fait je me retrouve avec un cour en dessous des deux "Trendline" Voici le code : void Tline(string name,datetime tim1,double pr1,datetime tim2,double pr2,color col,bool fl=false) { if(!opnovis)return; if(ObjectFind(name)<0){if(!ObjectCreate(name,OBJ_TREND,0,tim1,pr1,tim2,pr2))return;} ObjectSet("D_S2 line",OBJPROP_WIDTH,2); ObjectSetInteger(0,name,OBJPROP_COLOR,col); ObjectSetInteger(0,name,OBJPROP_TIME1,tim1); ObjectSetInteger(0,name,OBJPROP_TIME2,tim2); ObjectSetDouble(0,name,OBJPROP_PRICE1,pr1); ObjectSetDouble(0,name,OBJPROP_PRICE2,pr2); if(fl)ChartRedraw(); } Files: eurusd-m1-forex-capital-markets.png 8 kb Using the price level of a teminal implemented Horizontal Line Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes Useful features from KimIV New comment
Bonjour, je me trouve face à un problème, j'ai un décalage important en Pips dans mes "Trendline", il faudrait que le cour soit exactement entre les deux "Trendline" et en fait je me retrouve avec un cour en dessous des deux "Trendline"
Voici le code :
void Tline(string name,datetime tim1,double pr1,datetime tim2,double pr2,color col,bool fl=false)
{
if(!opnovis)return;
if(ObjectFind(name)<0){if(!ObjectCreate(name,OBJ_TREND,0,tim1,pr1,tim2,pr2))return;}
ObjectSet("D_S2 line",OBJPROP_WIDTH,2);
ObjectSetInteger(0,name,OBJPROP_COLOR,col);
ObjectSetInteger(0,name,OBJPROP_TIME1,tim1);
ObjectSetInteger(0,name,OBJPROP_TIME2,tim2);
ObjectSetDouble(0,name,OBJPROP_PRICE1,pr1);
ObjectSetDouble(0,name,OBJPROP_PRICE2,pr2);
if(fl)ChartRedraw();
}