//+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { //--- if(id==CHARTEVENT_KEYDOWN) // CHARTEVENT_KEYDOWN if(lparam==71) { string obj_spread="Market Spread"; spread=MarketInfo(Symbol(),MODE_SPREAD); s string s=+DoubleToStr(spread,0)+" pips"; ObjectCreate(obj_spread,OBJ_LABEL,0,0,0); ObjectSet(obj_spread,OBJPROP_CORNER,0); ObjectSet(obj_spread,OBJPROP_YDISTANCE,16); ObjectSet(obj_spread,OBJPROP_XDISTANCE,190);e ObjectSetText(obj_spread,s,5,"FixedSys",Blue); ObjectSetText(obj_spread,s); WindowRedraw(); } }
barabashkakvn:
Thank u!!
ahh sry i'm new here i didnt know the src button.
how about we answer the question and not argue semantics, we would all like to know how to fix that error. thank you

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
i compiled it with the aim to show me the spread of the market when i press 'Q' but i get this error " comma expected"
thx,