new_global(«total_net2»,0)
total_net2=total_net2+0
new_global(«cur_bar», 0)
new_global(«send_trans», 0)
new_global(«long», 0)
new_global(«trans_id», 1)
new_global(«bar_enter», 0)
new_global(«number_stop»,0)
new_global(«enter_price»,0)
new_global(«deals»,0)
new_global(«first_start»,0)
new_global(«last2»,0)
new_global(«changeBu»,0)
changeBu=changeBu+0
quant=1
servertime=GET_INFO_PARAM («SERVERTIME»)
hournow=SUBSTR(servertime,0,2)
minnow=SUBSTR(servertime,3,2)
secnow=SUBSTR(servertime,6,2)
SecInfo = GET_SECURITY_INFO("", code)
Lot = GET_VALUE (SecInfo, «LOT_SIZE»)
class=get_class(code)
market=get_market(class)
time=get_datetime()
minute=get_value(time,«MIN»)
hour=get_value(time,«HOUR»)
sec=get_value(time,«SEC»)
curtime=hour*10000+minute*100+sec
dayofweek=get_value(time,«DAYOFWEEK»)
year=get_value(time,«YEAR»)
month=get_value(time,«MONTH»)
day=get_value(time,«DAY»)
curdate=year*10000+month*100+day
TOTAL_NET=get_total_net(market,client,code)+0
CBPLPLANNED=get_CBPLPLANNED(market,client)
timeframe=0
if market&""=«micex»
lot =get_value(get_param_ex(class, code, «LOTSIZE»),«PARAM_VALUE»)+0
total_net=0+total_net'/lot
end if
line=0
string=create_map()
delete_all_items()
last= GET_PARAM (class, code, «LAST»)
bid = GET_PARAM (class, code, «BID»)
offer = GET_PARAM (class, code, «OFFER»)
error=0
open0=0
if first_start==0
if total_net!=0
enter_price=READ_LINE (path&«enter_price.txt», GET_FILE_LEN(path&«enter_price.txt»), error)
end if
first_start=1
end if
if (get_permission()+0)==1