Code Monkey home page Code Monkey logo

marginpolo's Introduction

Easy-to-use Python bot for managing Poloniex Margin Positions

How it works

Bot will loop through open margin positions, and set an initial stop loss ATR*n from base price. After setting the stop loss, the distance to the base price is monitored, and will be accelerated everytime the position is recorded in profit.

After getting latest price, the stop loss trails price at the current distance if price moved in favor of the trade, and stays put if the move is closer to the stop loss.

Everytime the position is recorded as positive % profit, the distance is multiplied by 1 - (%profit * n)

Example output

Conole output example, when running:

[USDT_TRX LONG]
-- Base price    : 0.07750198 USDT
-- Current price : 0.07728653 USDT
-- stop loss     : 0.07680618 USDT (distance: 0.00069580 USDT)
-- P/L: -0.21521508 USDT (-0.28 %)

How to run

Open the folder in an IDE or in a terminal window after downloading or cloning, and make sure you got your api_credentials.txt file made, with api key on first line and api secret on second line. Run the main.py file:

python main.py

marginpolo's People

Contributors

cobythetat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.