Добрый день,
по просьбе трудящихся выкладываю пример на QPILE
по просьбе трудящихся выкладываю пример на QPILE
Код |
---|
PORTFOLIO_EX TEST; DESCRIPTION TEST; CLIENTS_LIST ALL_CLIENTS; FIRMS_LIST FIRM_ID; USE_CASE_SENSITIVE_CONSTANTS; PROGRAM NEW_GLOBAL("count",0) NEW_GLOBAL("CLAS","CETS") NEW_GLOBAL("List","USD000000TOD,EURUSD000TOD,EUR_RUB__TOD") NEW_GLOBAL("com",0.000445) i=1 dif=0 e=1-3*com f=create_map() z=create_map() FOR SEC IN List s=get_param_ex(CLAS,SEC,"SHORTNAME") n=get_value(s,"PARAM_IMAGE") s=get_param_ex(CLAS,SEC,"LAST") p=get_value(s,"PARAM_IMAGE")+0 s=get_param_ex(CLAS,SEC,"OFFER") po=get_value(s,"PARAM_IMAGE")+0 s=get_param_ex(CLAS,SEC,"BID") pb=get_value(s,"PARAM_IMAGE")+0 s=get_param_ex(CLAS,SEC,"LOTSIZE") q=get_value(s,"PARAM_IMAGE")+0 z=set_value(z,"Name",n) z=set_value(z,"last",p) z=set_value(z,"bid",pb) z=set_value(z,"offer",po) z=set_value(z,"lotsize",q) IF count=0 add_item(i,z) ELSE MODIFY_ITEM(i,z) END IF IF i==3 IF pb>0 dif=e/pb-1 f=set_value(f,"lotsize",dif) END IF ELSE e=e*po END IF i=i+1 END FOR IF count=0 add_item(4,f) ELSE MODIFY_ITEM(4,f) END IF count=1 END_PROGRAM PARAMETER Name; PARAMETER_TITLE Name; PARAMETER_DESCRIPTION here is Name; PARAMETER_TYPE STRING(15); END PARAMETER last; PARAMETER_TITLE last; PARAMETER_DESCRIPTION good; PARAMETER_TYPE STRING(10); END PARAMETER bid; PARAMETER_TITLE bid; PARAMETER_DESCRIPTION good; PARAMETER_TYPE STRING(10); END PARAMETER offer; PARAMETER_TITLE offer; PARAMETER_DESCRIPTION good; PARAMETER_TYPE STRING(10); END PARAMETER LOTSIZE; PARAMETER_TITLE lotsize; PARAMETER_DESCRIPTION good; PARAMETER_TYPE STRING(10); END END_PORTFOLIO_EX |