<<  >> (p.123)
    Author Topic: BTCD is no more  (Read 1328526 times)
    jl777
    Legendary
    *
    Offline Offline

    Activity: 1176
    Merit: 1134


    View Profile WWW
    July 28, 2014, 11:50:43 PM
     #2441

    Just finished up defining the input/output process for the tradebots. Unfortunately it is getting a bit complicated for all the aspiring language creators, but the good news is the picoTradebotLanguage, PTL should be relatively easy to write, if you know C

    Here are the data types for PTL:

    structN - N bytes
    bit[n] - N bits
    ['u']char[V] - 8 bits
    ['u']short[V] - 16 bits
    ['u']int[V] - 32 bits
    ['u']long[V] - 64 bits
    ['u']float[V] - 32 bits
    ['u']double[V] - 64 bits

    All except struct ant bit types support unsigned. Yes, even floating point! On output, an unsigned float/double type automatically gets fabs() applied to it. The "struct" type is just an arbitrary number of bytes that will be allocated for output. bit[n] means "bit" or "bit1", or "bit2", etc. bit2 would be two bits, bit13 would be thirteen bits. For output having bitfields doesnt make much sense, but when it is used as inputs, then it starts making much more sense, as 32 "bit" inputs would fit into a single uint32_t

    Now all the other scalar types have a [V], so you can do int4, int13, double16, etc. double16 is a vector of 16 doubles
    Unfortunately this syntax has different meanings for the suffix, eg. N bytes or n bits or V elements, but hopefully it wont cause too much confusion.

    A tradebot would register an output type with a name and it is responsible for keeping this updated.
    So for input, you can specify the output of any other tradebot's outputs and due to the nature of the data stream it will be useful to modify the inputs, eg. SMA, EMA, filters, etc. So I have a "conditioner" field that will allow you to specify how an input field is conditioned and made available to your tradebot. This will be easily extensible to add a large variety of different signal processing algos.

    I realized I have a bug in my bitpacking of inputs when they are not conditioned, so back to the coding I go. I fix that bug and start to create PTL callable functions. The power of this will become apparent soon Smiley

    James

    http://www.digitalcatallaxy.com/report2015.html
    100+ page annual report for SuperNET
Page 122
Viewing Page: 123