Coder Social home page Coder Social logo

alm0ra / paper_trading_view Goto Github PK

View Code? Open in Web Editor NEW
59.0 3.0 9.0 120.88 MB

PTV is a useful widget for trading view for doing paper trading when bar reply is enabled.(this feature did not implement in trading view)

License: MIT License

Python 100.00%
trading-platform tradingview tradingview-widget tkinter-gui papertrade demo-trade papertradingview ptv priceaction trader

paper_trading_view's Introduction

Alt text

GitHub GitHub contributors GitHub repo size GitHub top language

PTV (paper-trading-view)

paper_trading_view is project written for simulate trade in Demo it use trading view when bar reply is enable.
as you know trading view doesn't have paper trading on bar reply and we prepare it for you in this project, PTV provide you a demo account for upgrade your skill in trading

Why?

this feature does not exist in TradingView . you can use it for train , backtest youre strategies

How It Works

howwork

Quick installation (for windows users)

1- Download project

you can easily download executable version of this project from this Link

2- make sure you installed chrome browser on your device . go to tradingview.com and login into your account .

3- Extract .rar file and Run ptv.exe

Quick installation tutorial video

Notice: Every time you want to run ptv.exe make sure chrome is closed before.

Features

  • Based on Python 3.7+: For botting on any operating system - Windows, macOS and Linux.
  • work with TradingView: For bar reply and getting price we use trading view.
  • Limit/Market orders: you can place a Limit or Market order in 2 side "long", "Short" .
  • SL/TP set: you can set stop loss and take profit for your market or limit order .
  • see Open orders: you can see list of open orders.
  • see Open positions: you can see list of open positions.
  • see trade history: you can see list of trade history.
  • Next/Play/Pause in bar reply: you can use this items in PTV and when price is changing open positions and open orders will be check.
  • initial setting: you can set your initial money / commission.
  • profit/loss of account: your total profit / loss calculate when your position close.
  • save report: you can save your trade history in a csv file.

Requirements

  • Python 3.7+ (install it from website)
  • Chrome driver (Download it from website)
  • selenium ,tkinter

Getting start

make sure you installed python3.7+

# you can clone project from github
git clone https://github.com/xibalbas/paper_trading_view.git
cd paper_trading_view/src

# or
# you can download project zip file and extract 
https://github.com/xibalbas/paper_trading_view/archive/refs/heads/master.zip
cd paper_trading_view-master/src

make an enviorment

sudo apt-get install python3-tk
pip install virtualenv
python -m venv venv

# Linux Users
source venv/bin/activate

# Windows Users
.\venv\Scripts\activate.bat

install requirements packages

pip install -r requirements.txt

Run

python app.py

Contributing

Contributions are very welcome. There are a number of requirements:

  • See Issues tab, and feel free to submit your own issues
  • Add PRs if you discover a solution to an existing issue
  • The code should be Pep8 compliant.
  • Comments are required for every class and function and they should be a clear description.
  • At least one broad test case and a set of unit tests must be provided for every function.
  • Avoid very pythonic construction

License

PTV is freely available under the MIT license.

paper_trading_view's People

Contributors

alm0ra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

paper_trading_view's Issues

it is not running in my windows 11 64 bit

Traceback (most recent call last):
File "app.py", line 38, in
File "selenium\webdriver\chrome\webdriver.py", line 76, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97
Current browser version is 103.0.5060.114 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "app.py", line 56, in
RuntimeError: input(): lost sys.stdin

user data directory is already in use

Traceback (most recent call last):
  File "[app.py]()", line 38, in <module>
  File "selenium\webdriver\chrome\[webdriver.py]()", line 76, in _init_
  File "selenium\webdriver\remote\[webdriver.py]()", line 157, in _init_
  File "selenium\webdriver\remote\[webdriver.py]()", line 252, in start_session
  File "selenium\webdriver\remote\[webdriver.py]()", line 321, in execute
  File "selenium\webdriver\remote\[errorhandler.py]()", line 242, in check_response
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[app.py]()", line 56, in <module>
RuntimeError: input(): lost sys.stdin

BTCUSD bug

Hey xibalbas, i will be making many issues, not because i dislike this program but because i love it so i hope you don't mind.

There is an issue where the program will use BTCUSD instead of the chart that is default (EURUSD for me)

Bad ordering error

Sometimes there is a bad ordering error when using limits, the trade will not execute.

Market order

Sometimes the market order will not work and say invalid tp and sl even though it is not.

the app didn't work and showed two errors

I gave full access to the Google Chrome software in the security settings, but it still didn't work. What should I do to solve the problem?
Please help me.

I put two screanshots about them here:

Screenshot 2023-01-20 122236
Screenshot 2023-01-20 122329

demo installation

hello could you post a demo video on how to install things properly for those of us not familiar with coding and python usage
the idea of your application is brilliant ive been searching ages for such
pretty sure it is worth some money
only thing i struggle with is to run it on python as i constantly get message of wrong sintaxis when copypasting or im doing it totally wrong

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.