1.1 Perfect Squares And Related Patternsmr. Mac's Page



FMZ is an automated trading platform for cryptocurrency traders with support for many bitcoin/eth/altcoin exchange markets.We has a complete tutorial for beginners, such as https://www.fmz.com/bbs-topic/3649 . Only need studying a couple of days, you are ready to code for your own robot.

The lesson titled Evaluating Square Roots of Perfect Squares has been designed to specially complement the quiz. It will cover topics such as: Describing the relationship of squares and square roots. For the crust: Preheat the oven to 350 degrees F. Line a 9-by-13-inch rectangular baking pan with foil and spray with cooking spray. Place the graham crackers and pecans into the bowl of a food. There are times when we need to edit or review Apple’s native pages file format on Microsoft Windows. If you try to open a pages document on your Windows PC using Word (or a similar program,) you quickly discover that Word (and similar) does not recognize Apple’s word processing format.pages files. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit molestiae mollitia laudantium assumenda nam eaque, excepturi, soluta, perspiciatis cupiditate sapiente, adipisci quaerat odio voluptates consectetur nulla eveniet iure vitae quibusdam?

What can FMZ do for me?

You can learn how to write your bots(strategies) from our strategies’ square which contains lots of open source code, share your strategy’s code with others,ask for professional help any time, run your strategy on any exchanges, contorl your bot on website with computer or cellphone, sell your strategies if you want,communicate with many other auto-trading lovers in our group. In a word, FMZ is a perfect platform for those who want do automated trading.

Which Cryptocurrency exchanges does FMZ support?

FMZ supports almost all exchanges that are popular, such as Binance, Bitfinex, Bitstamp, OKEX, Huobi, Poloniex,etc. you can also trade futures on OKEX and BitMEX.Check a full support list on 2.2.1 Add Exchange.You only need to write one strategy and run it on all exchanges without any changes.

What kinds of programming languages can I use to write my strategies?

FMZ supports JavaScript, Python, C++ (JavaScript and Python are recommended) for coding your strategies. Benefiting from the completed languages supporting(not a custom languageonly can be used for one platform), you can improve your programming skills as well as learn to write strategies.

Related

What is the docker?

The docker is a program that runs on your own Internet Server, which in charge of the data request, data reception, network link, Log review etc.You can treat it like your strategy’s executor. Even if the FMZ server offline (breakdown, etc.),it will have no influence on your robot that is running.The Manager can run on variety of operating system.Such as Windows, Linux, Mac OS, Android, Raspbian, etc.

What is backtest system? What it uses for?

When you completed a quantitative strategy, how do you know that the logic, amount and direction of profit of this strategy goes? Does it work? Apparently, we wouldn’t use the real money to test our strategies on the real market. But we could use the historical data to test it, see how it works out on the time, profit, and asset management in the past. It is winning or losing? How to use the Backtest System?

Does the number from the backtest system accurate? The results can be trusted?

FMZ divides the backtest system into real market level and simulation level.The real market level contains the whole completed historical data back testing.

The simulation level contains the k-lines data at regular intervals.Both level are based on the real market historical data. Only the real market level is more accurate and the results are more reliable.

The simulation level Backtest System explanation.

Notice that backtesting is the strategy only preform in the past. Historical data doesn’t represent the future. History may replay, it also may lead to the black swan. Please treat the backtest results reasonable and objectively.

If you are new to trading, you need to understand a few basic concepts:

KEY-WORD: “Futures”, “Spot”, “Stock”, “Position”, “Long”, “Short”, “Balance”, “Margin Call”, “Hedge”,“K Line”, “MACD”, “Ask / Bid”.

1.1 perfect squares and related patternsmr. mac

1.3.1 A quick look of the main page¶

After learning the most basic concepts, let’s start using FMZ to explore the quantitative world.(Building your own quantitative trading system is a very large project, you need to have considerable computer knowledge and skills, fortunately, FMZ has done this for you!)

Register your FMZ account,Log in to https://www.fmz.com.

First time to log in the website, it looks like this:

  • 1.Your main control page
  • 2.Manage all your bots (start,stop,delete,open,etc)
  • 3.Manage all your strategies’ code
  • 4.Deploy and manage your docker
  • 5.Add new exchanges
  • 6.Manual trading on the exchanges you added
  • 7.Pay your bill
  • 8.Ask any question here
  • 9.FMZ’s simulated exchange
  • 10.Debug tool where you can run a block of code without start a bot.
  • 11.All kinds of message
  • 12.Strategy square where open-source and charging strategies are listed
  • 13.Live Robots where all live-running bots are listed.
  • 14.Forums where you can post a post to discuss any question related.
  • 15.Ask for someone to write code for you or provide this service for others.
  • 16.Products for exchanges and agencies.
  • 17.API documentation.
  • 18.Some useful tools, check for yourself.
  • 19.Your account information.

1.3.2 Deploy the docker¶

First of all, FMZ’s framework is very advanced,the user’s robot program (that is, the automated trading program) is running on the user’s own computer (of course, it can also be run on the cloud server),So, it’s very safe (don’t need worry about the FMZ website breakdown etc.), the user has direct control over the program.

Docker is a program that run your robots and communicate with FMZ website. You need to run a Docker first before start a real market robot.

Note

It is highly recommended to use the cloud server for runing program stably, such as Amazon or Google Cloud Server.

In the Dashboard page–Adddocker button, you can link to the download page https://www.fmz.com/m/add-node.

Here are steps to deploy the dockr in a Linux server(centOS 6):

  • Buy a cloud server (VPS) from Amazon or Google, the lowest and cheapest configuration is enough. you may often has a free try for a long time.
  • Login your server, fellow the instruction from your server provider or Google.
  • Chose the docker that statisty your system version, most of the time, it is 64Bit.
  • For centos, run wget'http://q.fmz.net/dist/robot_linux_amd64.tar.gz', command not found? install first yuminstallwget-y.
  • Run tar-xzvfrobot_linux_amd64.tar.gz to unzip.
  • Run ./robot-srpcs@node.fmz.com:9902/xxxxxx-pyourFMZpassword,you should see something like 2018/07/0505:04:10LoginOK,SID:62086,PID:7226,Name:host.localdomain, which means everything is worked.
  • rpcs@node.fmz.com:9902/xxxxxx is unique to every users, find your own on https://www.fmz.com/m/add-node.
  • Now the docker isn’t run in the background, if you close the SHH client, the docker will stop.
  • Press ctrl+C to stop the docker.
  • Run nohup./robot-srpcs@node.fmz.com:9902/xxxxxx-pyourFMZpassword& to run in the background. this step can also be done by Screen command.
  • Check on https://www.fmz.com/m/dashboard, if everything is OK , you can find the docker deployed.

Steps to update the docker:

Note

If you want to keep the old docker, one server can run many dockers, just create a new folder and repeate the deploy steps.

Mac
  • Stop all robots that run on the docker.
  • Delete the docker from FMZ website. the docker will stop on your server too(don’t have to, you can run two dockers on one server, just create a new folder)
  • Run rm-rfrobot_linux_amd64.tar.gz in your dokcer files to delete the old docker.
  • Run wgethttp://q.fmz.net/dist/robot_linux_amd64.tar.gz to download the lastest docker.
  • Repeate the steps above.
  • Change robot’s config to use the new docker, restart robots.

Note

One docker can run many robots, however, you can deploy more than one dockers on different server for speed or request-rate-limit consideration.the docker can be specified or auto-distributed when start a robot.

Warning

There are two public dockers for testing. don’t use them to run your robot on real market.

1.3.3 Add exchanges¶

Add your exchanges at this page: https://www.fmz.com/m/add-platform.

Now support:

AccessKey and SecretKey is needed, you should apply on your exchange first.

Once the exchange is added, you can find it on Dashboard https://www.fmz.com/m/dashboard.

Note

New exchange supported is keep being added. you need to update the lastest docker to support new exchange.

1.3.4 Write or copy a strategy¶

Note

There are lots of details this docs doesn’t cover, you can explore by yourself, most of them are simple and clear.You can always post on our forum if you have any question.

Write your own strategy by clicking AddStrategy.

You can choose different code languages and backtesting

For beginners, copy this strategy to begain: https://www.fmz.com/strategy/103070, which can be found on https://www.fmz.com/square.

Click Copyandbacktest:

Click Creat:

Now your can find this strategy on your dashboard strategies list. https://www.fmz.com/m/dashboard

And1.1 Perfect Squares And Related Patternsmr. Mac

Edit your code here, don’t forget to save your code:

  • 1.Edit your code
  • 2.Backtesting, we will cover this part on an intermediate tutorial
  • 3.The programer language of your code, JavaScript was used in this demo
  • 4.The title, “|” splits Chinese and English title, which one will be showed is decided by the language of FMZ website
  • 5.The type of your strategy, the default is common
  • 6.The category of your strategy. You can divide your strategies into different categories if you have too many
  • 7.Remote editing your code from your own IDE instead of our website
  • 8.A link to the API doc
  • 9.Notes of the strategy(only be seen by yourself). you can record the thoughts here.
  • 10.Descriptions of the strategy. Others will see the descriptions if you share or sell your strategy on Square.
  • 11.Manual of the strategy, can only be seen when someone bought your strategy.
  • 12.Save your code, or Ctrl+S on edit mode.
  • 13.Save the backtesting config on the code.
  • 14.Download the strategy file
  • 15.Export and import the strategy while keeping all the parameters
  • 16.Change the font size and edit the theme
  • 17.Format the code automatically
  • 18.Use VIM mode to edit.

Change and add global variables here:

1.3.5 Backtest your strategy¶

Click Stragegy name to strategy page.

Go to backtest page:

Add exchange and config your strategy:

Click StartBacktest to start.

1.3.6 Run a robot on Wexapp¶

Wexapp is FMZ Simulation Exchange, which is basically the same as a real exchange but free of charge, you can run your robot on FMZ Simulation Exchange for testing your strategy.

First, you need to deposit assets on your simulation account on https://www.fmz.com/m/sandbox.

Click AddRobot or https://www.fmz.com/m/add-robot to run a robot.

Config page as below:

You can find your robot is running on dashboard Now.

Go to robot page:

You can check the robot’s status and Logs, change the configs(need to stop robot first),

1.3.7 Charges Notes¶

0.125 RMB per robot per hour(around 0.018 USD).

robot run on FMZ Simulation Exchange(Wexapp) is free.

Some of the most common waveforms needed in simulating voltage and current sources are sine, square, triangular and sawtooth shapes.

LTspice® simulation software has a built-in pulse, sine, exponential, single frequency FM and an arbitrary piece-wise linear functions available in the source component editor. Although it may not look like it, LTspice does have a triangular and sawtooth functions available but they need to be created from either a PULSE or PWL function.

PULSE Function

PULSE fuction is often used in transient circuit simulation where we want the source to behave like a square wave. You can omit Ncycles if you need a free-running square waveform.

PULSE(Voff Von Tdelay Trise Tfall Ton Tperiod Ncycles)

A simple approach to creating a triangular and sawtooth waveform is using the PULSE fuction using the source component editor shown above. For the triangular waveform you can set the rise and fall time equal to 1/2 of your desired period in your pulse function. Likewise, to create a sawtooth fuction you cab set the rise time equal to the period and the fall time to zero. The PULSE function can be further modify to best match your simulation needs. Waveforms for these two fuctions are show on the top of the page.

PWL Function

For any arbitrary or complex waveform, you can always rely on the piece-wise linear function. The arbitrary piece-wise linear fuction is defined by a sequence of time and voltage pairs.

PWL(t1 v1 t2 v2 t3 v3...)

This specifies that for time before t1, the voltage is v1. For times between t1 and t2, the voltage varies linearly between v1 and v2. There can be any number of time, voltage points given and for times after the last time, the voltage is the last voltage.

To implement a triangular or sawtooth waveform you could use the following piece-wise linear functions. Waveforms for these two fuctions are show on the top of the page.

These two examples use an undocumented repeat feature of PWL function. To explore these features you will need to directly edit by right-clicking on the source symbol's text in the schematic editor rather than using the source component editor.

Here are some highlights of the undocumented features for the PWL fuction:

  • Repeat date pairs forever

PWL REPEAT FOREVER (0 0 .5 1 1 0) ENDREPEAT

  • Repeat data pairs for 5 cycles

PWL REPEAT 5 (0 0 .5 1 1 0) ENDREPEAT

  • A trigger expression that turns the source on as long as the expression is true

PWL (0 0 .5 1 1 0) TRIGGER V(node)>1

  • Scaled the time or source values

PWL TIME_SCALE_FACTOR=0.5 VALUE_SCALE_FACTOR=2 (0 0 .5 1 1 0)

More information on the pulse, sine, exponential, single frequency FM and an arbitrary piece-wise linear functions is available in the LTspice help file (F1). An example LTspice simulation is also provided below for your reference.