your code is broken press Ctrl + , and follow the brackets.
Marco vd Heijden:
your code is broken press Ctrl + , and follow the brackets.
your code is broken press Ctrl + , and follow the brackets.
Where code is broken? I'm asking you to help fix bugs.
//+------------------------------------------------------------------+ //| Break Even.mq4 | //| Copyright 2016, | //| /ru | //+------------------------------------------------------------------+ #property copyright "Copyright 2016, " #property link "/ru" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 //--- plot BreakEven #property indicator_label1 "BreakEven" #property indicator_type1 DRAW_LINE #property indicator_color1 clrGold #property indicator_style1 STYLE_SOLID #property indicator_width1 1 //--- indicator buffers double BreakEvenBuffer[]; //+------------------------------------------------------------------+ //| We expect to break even | //+------------------------------------------------------------------+ int OnInit() { double LotSize(string symbol,datetime tbar) { double size; string BQ,currency=AccountCurrency(); switch(MarketInfo(symbol,MODE_PROFITCALCMODE)) { case 0: { int sbar=iBarShift(symbol,0,tbar); size=MarketInfo(symbol,MODE_LOTSIZE); if(StringSubstr(symbol,3,3)=="USD") break; if(StringSubstr(symbol,0,3)=="USD") size=size/iClose(symbol,0,sbar); else { BQ=StringSubstr(symbol,0,3)+"USD"; if(iClose(BQ,0,0)==0) BQ="USD"+StringSubstr(symbol,0,3); if(iClose(BQ,0,0)==0) break; int BQbar=iBarShift(BQ,0,tbar); if(StringSubstr(BQ,0,3)=="USD") size=size/iClose(BQ,0,BQbar)/iClose(symbol,0,sbar); else size=size*iClose(BQ,0,BQbar)/iClose(symbol,0,sbar); } } break; case 1: size=MarketInfo(symbol,MODE_LOTSIZE); break; case 2: size=MarketInfo(symbol,MODE_TICKVALUE)/MarketInfo(symbol,MODE_TICKSIZE); } if(currency!="USD") { BQ=currency+"USD"; if(iClose(BQ,0,0)==0) { BQ="USD"+currency; size*=iClose(BQ,0,iBarShift(BQ,0,tbar)); } else size/=iClose(BQ,0,iBarShift(BQ,0,tbar)); } return(size); } //--- indicator buffers mapping SetIndexBuffer(0,BreakEvenBuffer); //--- return(INIT_SUCCEEDED); }
it tells you where to look
Marco vd Heijden:
I know where to look. I do not understand how to correct the mistake, so asked for help.
it tells you where to look
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
When compiling two errors: I do not think what is wrong and how to fix it. Tell me please.