Browse Source

Test

etomic
jl777 7 years ago
parent
commit
34edbfc270
  1. 9
      iguana/exchanges/LP_portfolio.c

9
iguana/exchanges/LP_portfolio.c

@ -277,20 +277,13 @@ void LP_autopriceset(void *ctx,int32_t dir,struct LP_priceinfo *basepp,struct LP
double margin,minprice,newprice,oppomargin,fixedprice,factor,offset; double bid,ask; int32_t changed; double margin,minprice,newprice,oppomargin,fixedprice,factor,offset; double bid,ask; int32_t changed;
margin = basepp->margins[relpp->ind]; margin = basepp->margins[relpp->ind];
oppomargin = relpp->margins[basepp->ind]; oppomargin = relpp->margins[basepp->ind];
if ( (fixedprice= relpp->fixedprices[basepp->ind]) > SMALLVAL ) if ( (fixedprice= basepp->fixedprices[relpp->ind]) > SMALLVAL )
{ {
LP_mypriceset(&changed,relpp->symbol,basepp->symbol,fixedprice); LP_mypriceset(&changed,relpp->symbol,basepp->symbol,fixedprice);
printf("autoprice FIXED %s/%s <- %.8f\n",basepp->symbol,relpp->symbol,fixedprice); printf("autoprice FIXED %s/%s <- %.8f\n",basepp->symbol,relpp->symbol,fixedprice);
LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,relpp->symbol,basepp->symbol,fixedprice); LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,relpp->symbol,basepp->symbol,fixedprice);
return; return;
} }
else if ( (fixedprice= basepp->fixedprices[relpp->ind]) > SMALLVAL )
{
LP_mypriceset(&changed,basepp->symbol,relpp->symbol,fixedprice);
printf("autoprice FIXED2 %s/%s <- %.8f\n",basepp->symbol,relpp->symbol,fixedprice);
LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,basepp->symbol,relpp->symbol,fixedprice);
return;
}
if ( margin != 0. || oppomargin != 0. ) if ( margin != 0. || oppomargin != 0. )
{ {
offset = basepp->offsets[relpp->ind]; offset = basepp->offsets[relpp->ind];

Loading…
Cancel
Save