semvec/pypi-packages huggingface dataset:
nbresnote 0.2.2
auto research note conversion

# Auto-research-note generator from Jupyter notebook

**Author :** jh.jung  


From jupyter notebook, making the research note to md file with simple syntax.  

- TOC(Table of contents)
- code
- figure
- table
- Daily note

## Installation

Using pip :

```shell
pip install nbresnote
```

## Usage

- For autorun when `git commit`, run below on your git repository :  

```shell
nbresnote install
```

For now, the `install` command will make the clone of your wiki repository of current git into `wiki/` folder.
Unfortunately, this is fixed.


- For run specific `.ipynb` files

```shell
nbresnote note1.ipynb note2.ipynb ...
```

## Documentation

### Syntax

Basically, `nbresnote` ignore all code cells. The module will read only markdown cell for making research notes.

Internelly, `nbresnote` trace the diff of git commit files, and get folder and filename of `.ipynb` in commit,  
and auto documenting the markdown and daily note for the git repository.

You can check the example folder.

Here we prepare for specific syntax `!(command)`

- TOC(Table of contents) :  
    
    Table of Contents is simple anchor of whole notebook headers
    >example)
    >`!TOC` in jupyter notebook
    ![toc](png/TOC.png)


- code
- figure
- table
- Daily note

See wiki tabs.

## future work :  

- configuration change
- directive of rst
- reference of outputs
IBTrading 1.0.3
MT5 automation

# IBTrading

## MT5
    https://www.metatrader5.com/

    To test your strategy, use the demo account
    You are fully responsible for the use of this module as well as financial losses related to it.

## Strategy
    Make a function with your strategy
    The function has parameters :
        ibTrading, 
        signals, 
        orders

```python
from IBTrading import *
from datetime import datetime
import time

def Strategy(ibTrading: IBTrading, signals: dict, orders: dict) -> None:
    """
        Trading strategy
        Params:
            ibTrading: IBTrading = API Instance
            signals: dict = Dictionary of signals
            orders: dict = Dictionary of ordres
    """
    
    # EUR USD #
    signal = signals['EuroUsd_M1']
    sma = signal.sma
    lastClose = signal.ticksData[-1].close
    direction = 'flat'
    if lastClose > sma:
        direction = 'buy'
    elif lastClose < sma:
        direction = 'sell'

    if direction == 'buy':
        if "EuroUsd" in orders.keys():
            if orders['EuroUsd'].orderType == ORDER_SELL:
                ibTrading.CloseOrder('EuroUsd')
            else:
                pass
        else:
            ibTrading.AddOrder(orderName='EuroUsd', symbol='EURUSD', volume=1.0, orderType=ORDER_BUY, deviation=20)
    
    elif direction == 'sell':
        if "EuroUsd" in orders.keys():
            if orders['EuroUsd'].orderType == ORDER_BUY:
                ibTrading.CloseOrder('EuroUsd')
            else:
                pass
        else:
            ibTrading.AddOrder(orderName='EuroUsd', symbol='EURUSD', volume=1.0, orderType=ORDER_SELL, deviation=20)
    ###########


    print('time:', datetime.now())
    print('lastClose:', lastClose)
    print("lastClose time:", datetime.fromtimestamp(signal.ticksData[-1].time))
    print('sma:', sma)
    print('signal (direction):', direction)
    print('\n')


    return


if __name__ == '__main__':
    ibTrading = IBTrading(Strategy)
    ibTrading.AddSignal(signalName="EuroUsd_M1", symbol="EURUSD", timeframe=TIMEFRAME_M1, SMAPeriod=10)
    
    while 1:
        ibTrading.Run()
        time.sleep(1)
```

## Run
    Start MT5 and run your script
    DON'T CLOSE IBTrading ORDERS WHILE SCRIPT IS RUNNING

## Stop
    Stop your script and on MT5 close all IBTrading orders