femtotrader / TALib.jl

A Julia wrapper for TA-Lib
Other
50 stars 11 forks source link

level 0 function should end their name with an exclamation point (!) #13

Open femtotrader opened 7 years ago

femtotrader commented 7 years ago

According http://docs.julialang.org/en/release-0.5/stdlib/base/#introduction

By convention, function names ending with an exclamation point (!) modify their arguments. Some functions have both modifying (e.g., sort!) and non-modifying (sort) versions.

level 0 functions modify arguments so it may be a better idea to end their name with an exclamation point (!)

femtotrader commented 6 years ago

https://github.com/femtotrader/TALib.jl/blob/master/src/ta_func_api_gen_level0.jl#L63

funcname = "_TA_" * string(symb_func)

->

funcname = "_TA_" * string(symb_func) * "!"

https://github.com/femtotrader/TALib.jl/blob/master/src/ta_func_api_gen_level1.jl#L134

s *= INDENT * "ret_code = _TA_$funcname($params_lv0)"

->

s *= INDENT * "ret_code = _TA_$funcname!($params_lv0)"