Guest User

Untitled

a guest
Jul 16th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. def _create_candle(self, index):
  2. candle = Candle(index)
  3. self.candles.append(candle)
  4.  
  5. def o(response):
  6. candle.open = response.result
  7.  
  8. def h(response):
  9. candle.high = response.result
  10.  
  11. def l(response):
  12. candle.low = response.result
  13.  
  14. def c(response):
  15. candle.close = response.result
  16.  
  17. def v(response):
  18. candle.volume = response.result
  19.  
  20. def t(response):
  21. candle.time = response.result
  22.  
  23. self._api.send("O", lambda response: candle.open = response.result, self._ds_id, index) # не работает
  24. self._api.send("H", h, self._ds_id, index)
  25. self._api.send("L", l, self._ds_id, index)
  26. self._api.send("C", c, self._ds_id, index)
  27. self._api.send("V", v, self._ds_id, index)
  28. self._api.send("T", t, self._ds_id, index)
Add Comment
Please, Sign In to add comment