能显示你在图表上画的水平线距离现价的点数,只要把它拖到你使的图表中即可!
我写过的脚本太多了。
比如在图表上画一条水平线然后系统判断所处位置自动挂单,如果移动线的位置挂单的价格也会跟着改变。
如果订单盈利后只要移动线就能移动止损和止赢!哈哈,太多了。
#property copyright "外汇联盟 www.FXunion.com QQ群144033"
#property link ""
string _verName="LOCLinePips";
string _ver="v2.0";
extern color _textColor=Lime;
extern int _sleepTimeMS=50;
bool _isRunning=false;
string _fullName;
string _objPref="LOCLinePips";
int start()
{
_fullName=_verName " " _ver;
Print("LandOfCash.net " _fullName " Started.");
Comment("LandOfCash.net " _fullName);
if(!_isRunning){
Iterate();
}
DeleteLabels(_objPref);
return (0);
}
void DoJob(){
int obj_total=ObjectsTotal();
string name;
DeleteLabels(_objPref);
for(int i=0;i { name=ObjectName(i); if(ObjectType(name)==OBJ_HLINE){ double price = ObjectGet(name, OBJPROP_PRICE1) ; CreateText(_objPref name,Time[0],price,_textColor,DoubleToStr(MathAbs((Bid-price)/Point),0)); } } } void Iterate() { _isRunning=true; while(!IsStopped()) { RefreshRates(); DoJob(); Sleep(_sleepTimeMS); } } void CreateText(string name, datetime time1, double price,color boxcolor, string text){ ObjectDelete(name); if(!ObjectCreate(name, OBJ_TEXT,0, time1, price)) { Print("error: cant create OBJ_TEXT! code #",GetLastError()); return(0); } ObjectSetText(name, text, 7, "Verdana", boxcolor); } void DeleteLabels(string objPref){ int obj_total=ObjectsTotal(); string name; for(int i=0;i { name=ObjectName(i); if(StringFind(name, objPref,0)-1){ ObjectDelete(name);EC markets入金 i--; } } } // ------------------------------------------------------------------