Last active
August 29, 2015 14:00
-
-
Save meeDamian/11049645 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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