能表明你在图表上画的水准线距离现价的点数,只要把它拖到你使的图表中即可!
我写过的脚本太多了。
比如在图表上画一条水平线然后系统分析所处位置自动挂单,假使移动线的位置挂单的单价也会跟着更改。
假使订单盈利后只要移动线就能移动止损和止赢!哈哈,太多了。
#property copyright "外汇联盟 www.FXunion.com QQ群144033"
#property link ""
tring _verName="LOCLinePips";
string _ver="v2.0";
extern color _textColor=Lime;
extern int _sleepTimeMS=50;
ool _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(){
intobj_total=ObjectsTotal();string name;DeleteLabels(_objPref);for(int i=0;i{name=ObjectName(i);if(ObjectType(name)==OBJ_HLINE){double price = ObjectGet(name, OBJPROP_PR洲际交易所1) ;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){
intobj_total=ObjectsTotal();string name;for(int i=0;i{name=ObjectName(i);if(StringFind(name, objPref,0)>-1){ObjectDelete(name);i--;}}}//+------------------------------------------------------------------+