Skip to content

Instantly share code, notes, and snippets.

@meeDamian
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meeDamian/11049645 to your computer and use it in GitHub Desktop.
Save meeDamian/11049645 to your computer and use it in GitHub Desktop.
price = NaN
if o.type is "buy"
price = m.lastsellprice
@tmp.list[i].quantity = volume * price
else
price = 1 / m.lastbuyprice
@tmp.list[i].quantity = volume
@tmp.list[i].price = price
@tmp.list[i].price = price = if o.type is "buy" then m.lastsellprice else 1 / m.lastbuyprice
@tmp.list[i].quantity = volume * if o.type is "buy" then price else 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment