Pages:
Author

Topic: Cryptopia trading simulator development - page 2. (Read 353 times)

newbie
Activity: 28
Merit: 0
tSim was updated to 1.0.4b
changelog:
- added "stop loss" mechanics. Controlled by "allowableLosses" parameter in trading strategy settings.
Example:
"pingPongStrategyConfig" :
{
    "allowableLosses" : 0.05 - maximum allowable losses = 5%
    ...
    
}
newbie
Activity: 28
Merit: 0
Quote
Nice application, even though i'm not interested at all since there's plenty trading simulation. But i wonder why would you use Cryptopia or/and it's API since Cryptopia have bad reputation?
All trading platforms is facing issues of scamming/hacking/bad maintenance etc.
Bad reputation of Cryptopia is more explained with a lack of work with the community than some unsolvable problems on exchange.
I had not any serious troubles for half a year of using Cryptopia.
Many of the complaints that I have seen are created by people who do not understand the technical part of the work of the exchange and / or cryptocurrencies.
Or just they themselves violate basic informational safety rules and compromising their passwords/keys.
Cryptopia definitely has things that should be improved but this platform is not hopeless.

About my project: its kernel is created platform-independent and not tied to Cryptopia API.
And in general, to test the trading strategy, only the source of prices is needed - the balance is virtual, so reputation of the exchange does not really matter in that case.
I conceived this project as a simulator/trading robot is more flexible than typical "magic button" trader which can trade only BTC or ETH with one single strategy.
Cryptopia API was chosen just because I have an account on it.
I plan make project more modular in next development iterations and add API of some other exchange(s), so there's a lot of work waiting for me.
Even if this project does not become popular, as you said "there's plenty of trading simulation", then in any case I'll get a good line in my resume.
newbie
Activity: 28
Merit: 0
tSim was updated to 1.0.3b
changelog:
- trading strategy settings added in config file - "pingPongStrategyConfig"
- sessionDuration parameter moved to trading strategy settings

"sessionDuration" - trading session duration (in hours)
"pricesUpdatePeriod" - periods when orders prices updates to top buy/sell prices(in milliseconds)
"orderBaseAmount" - strategy uses this amount of coins in base currency to create buy orders
"totalBaseAmountToTrade" - maximum of coins in base currency which can be used by strategy

Example:
"pingPongStrategyConfig" :
{
   "sessionDuration" : 24,
   "pricesUpdatePeriod" : 1800000,
   "orderBaseAmount" : 2,
   "totalBaseAmountToTrade" : 10
}
newbie
Activity: 28
Merit: 0
tSim was updated to 1.0.2b
changelog:
- Updating orders' prices to current top prices now set to every 30 minutes
- In simulation mode added network latency imitation. Now simulation more relevant to real autotrading.
newbie
Activity: 28
Merit: 0
tSim updated to 1.0.1b
changelog:
- Reduced frequency of annoying "until the end of the session left" messages and fixed time format if session duration more than 24 hours
newbie
Activity: 28
Merit: 0
Project is frozen, same as Cryptopia.

Added demo builds of trading bot (t_bot):

Main restriction of "demo" build - you can trade only on BTC_USDT market()
t_bot_demo1.1.06b_windows_x86_32:
https://mega.nz/#!3vwVFCSC!rfmhRkASI0C3Dza5Y2Ou4tVNEKYSiOjYXBPscXowRSg
md5:
0af986c919164854afb9671fa2f55fe9

Main restriction of "demo2" build - you can trade on several markets but with minimal allowed amount of base currency (for USDT = 1 USDT)
t_bot_demo21.1.06b_windows_x86_32
https://mega.nz/#!Ci5hDArD!HDivqnT3JUHRV_B4FtxdtZGQXM0yA1uIZ8S9Dqo5B-g
md5:
c9b231ff60bb2a3402745445f5987e5c

General advises:
- try t_sim first
- do not use it on your main account
- do not use autotrading strategies with big amount of coin, remember about "totalBaseAmountToTrade" and "orderBaseAmount" parameters
- check how it's going periodically - there is still "b" in version number (beta)

To switch t_bot from/to simulation mode use "isSimulator" parameter:
"isSimulator" : false,  //trading on real account
"isSimulator" : true,  //simulation

For authorization set fields "publicKey" and "privateKey" in config.json:
"publicKey" : "yourapipublickeylookforitinaccountsettings",
"privateKey" : "yourapiprivatekeylookforitinaccountsettings",

links to t_sim1.1.06b:
windows x86_32
https://mega.nz/#!PmpVjIBQ!Zv1sydc3xWtYkUCUoVgTeCr9zHAbuaspHv6g67KidFw
md5:
0005e2855fedd69e07271b0a78f0d716

links to t_sim1.0.16b:
windows x86_32
https://mega.nz/#!vzgCyaxY!oX2C217dU5XFTOOwOIP1ulj99agLQTNGI9kufagjKlM
md5:
f5891759fdffad0e1cbe57bf7b0d0f4a

linux x86_64
https://mega.nz/#!H6ggHC4S!BKeiVQbFySQdOOTGBt_Q9uDXuHgztjDaEEOi4alW5r8
md5:
3110fd81a5c907cb11cc07de6c105df6

macosx x86_64
https://mega.nz/#!rrxSzCTT!srCE58T8zSDSpiazlMOtVSNuq5QuhrmI54a61HDG49E
md5:
6cac6efcec7ce021fd0a6afdd4a913a2

Always check md5 after downloading archive, always check extracted files with antivirus.

Trading simulator is a console application
Run t_sim.exe to start simulation.

Configuration of simulation is done through editing config file - config.json. It is in the same folder as tSim.exe
parameters:
    "isSimulator" - if true - simulation mode, otherwise - real trading(disabled in this version)
    "simulatedBalance" - you can specify amount of coins for simulation, it is a list - you can use several currencies. (Don't forget about comma after list element)
    "runOrderSequence" - list of custom orders sequences to run
    "includeMarkets" - list markets for trading, if you miss this parameter then simulator will use several markets with highest volume
    "excludeMarkets" - list markets you do not want to use in trading. It has higher priority than "includeMarkets" - if same market specified in both "includeMarkets" and "excludeMarkets", it will be excluded from
trading.
    "pingPongStrategyConfig" - trading strategy settings

Archive with t_sim contains example config file (config.json) and example of custom order sequence(exampleSequence.json). Edit them before use (or leave as is if you just want to see how it works).

If you run autotrading simulation:
- By default simulation lasts 24 hours, also you can specify your virtual balance in config file. Orders filled according to real situation on exchange. Resulting balance will be shown after simulation session expired.
If you run custom order sequence processing:
- Orders filled immediately. Resulting balance and profit will be shown after sequence  processed.

//////////////////////////////////////////////////////////////////////
history_collector
Periodically sends getTradeHistory requests to Cryptopia and saves data to SQL database (SQLite).

links to history_collector1.0.16b:
windows x86_32
https://mega.nz/#!uypCWISR!lkh7iDewnzzyFwN-ROqYfUIJUBcQAYLCvMznDhAthoA
md5:
771cd5a4a5b0c15e10eb2e6a4d998d5a

linux x86_64
https://mega.nz/#!juoA3AyL!Tl0l2fyTjU_akUmuREEuQRIuPJSGZKrNZhm64Yx7Igs
md5:
0469b6d1b5af8630b4b664e75872f8f6

macosx x86_64
https://mega.nz/#!OrwyUIqK!UB5rCaHW-p3rMWg7qcNhTIx5IBVL11IhTbTupGerJOw
md5:
8951368632489de497b95c484a88bdcf

How to use:
0. Edit config.json
1. Run history_collector
2. Wait...
3. Get trade history from database - "cryptopiahistory.sqlite". No need to stop history_collector process - let it fill database all time.

history_collector also builds and stores "candles" (OCHLV) for "m5" timeframe. (I know Cryptopia uses "m15" as base timeframe, but sometimes trading can be very intense, especially during pumps/dumps)

Config file format and log output are pretty similar to tSim.
To specify markets to collect history use "includeMarkets" with "historycollector" as trading strategy.
Example:
{   
   "includeMarkets" : [
   {
      "symbol" : "BTC_USDT",
      "tradingStrategy" : "historycollector"
   }
   ]
   
}  
Pages:
Jump to: