Code Monkey home page Code Monkey logo

fx_alarm_py's Introduction

Introduction of siruku6

Welcome! ( *˙︶˙*)و

Statistics

Top Langs

Topics

🌱 I’m currently learning

  • RL (Reinforcement Learning)
  • GA (Genetic Algorithm)

fx_alarm_py's People

Contributors

dependabot[bot] avatar siruku6 avatar

Stargazers

 avatar

Watchers

 avatar

fx_alarm_py's Issues

Cannot display error message of 400

Over 60 days period request cause following error on React frontend.

Failed to load resource: the server responded with a status of 400 ()

image

Ideal

Should display following error message in frontend browser.

Maximum size of between from and to is 60 days. You requested 318 days!

multiple entry

It may be valuable to entry multiple times in a row, if chart & indicators meet the conditions.
For example, it shows record high in specified candles, then it is possible to rise up higher than those candles.

Make the unit variable

Now, the unit to entry is stable set in a environment values.
It is more efficient to enable alter the unit depending on the chart & indicators.

Backtest: exit rule is wrong

  • Though the exit rule isn't satisfied, but position was closed
  • Though the curent price hit the stoploss price, but position wasn't closed

image

Backtest: exit-price is too optimistic

Be more negative, realistic on the scalping rule.
The backtest's profit is much higher than the real profit because the exiting price in the backtest is too optimistic.

Feature: improve the precision of the time resolution

Currently, my App processes only two time scales in one analysis.
For instance, those are H1 and D1.

But in real trade, price is going to rise or down rapidly in a few minutes.
This App can't recognize even if the some indicators indicate "not entry" in that "a few minutes".
This can recognize only the state of indicators produced from the close prices of either of two time scales.

to be

First, enable this App to recognize the behavior of prices and indicators per 5 minutes even if selected time scale is H1 or H4.
In the future, the goal may change from "per 5 minutes" to "per 1 minute", but this issue treats only "per 5 minutes".

support_or_registance() missing some arguments

[ERROR] TypeError: support_or_registance() missing 3 required positional arguments: 'position_type', 'current_sup', and 'current_regist'
Traceback (most recent call last):
  File "/var/task/main.py", line 21, in lambda_handler
    trader.apply_trading_rule()
  File "/var/task/models/real_trader.py", line 51, in apply_trading_rule
    self.__play_scalping_trade(candles)
  File "/var/task/models/real_trader.py", line 143, in __play_scalping_trade
    new_stop: float = self.__drive_trail_process(candles.iloc[-2], last_indicators)
  File "/var/task/models/real_trader.py", line 182, in __drive_trail_process
    possible_stoploss: float = self.stoploss_method()(

Fix: `swing_trader` is out of order

Phenomenon

[interface] 取引ルールを選択して下さい [0]: swing, [1]: wait_close, [2]: scalping, [3]: cancel: 0
[Trader] Which do you use ?  [1]: current_candles, [2]: static_candles :2
[interface] 通貨ペアは?
 [0]: USD_JPY, [1]: EUR_USD, [2]: GBP_JPY, [3]: USD_CHF: 2
[Trader] 通貨の価格の桁を選択して下さい [1]: 100.000, [2]: 1.00000, [3]: それ以下又は以外:1
何日分のデータを取得する?(半角数字): 120
[Trader] 画像描画する? [1]: No, [2]: Yes, [3]: with_P/L 2
[Trader] preparing base-data for judging ...
[Trader] judging entryable or not ...
[Trader] start sliding ...
Traceback (most recent call last):
  File "beta_cord.py", line 167, in <module>
    start_test_menu()
  File "beta_cord.py", line 79, in start_test_menu
    tr_instance.perform(rule=rule_name, entry_filters=[
  File "/root/opt/fx_alarm_py/models/trader.py", line 120, in perform
    result = self.backtest(candles)
  File "/root/opt/fx_alarm_py/models/swing_trader.py", line 25, in backtest
    sliding_result = self.__slide_prices_to_really_possible(candles=candles)
  File "/root/opt/fx_alarm_py/models/swing_trader.py", line 117, in __slide_prices_to_really_possible
    position_rows = self.__slide_prices_in_dicts(time_series=candles['time'], position_rows=position_rows)
  File "/root/opt/fx_alarm_py/models/swing_trader.py", line 127, in __slide_prices_in_dicts
    self.m10_candles = self.__load_m10_candles(time_series)
  File "/root/opt/fx_alarm_py/models/swing_trader.py", line 160, in __load_m10_candles
    return self._client.load_or_query_candles(first_time, last_time, granularity='M10')[['high', 'low']]
AttributeError: 'ClientManager' object has no attribute 'load_or_query_candles'
press Enter ...

[ERROR] AttributeError: 'TraderConfig' object has no attribute 'stoploss_strategy_name'

[ERROR] AttributeError: 'TraderConfig' object has no attribute 'stoploss_strategy_name'
Traceback (most recent call last):
  File "/var/task/main.py", line 21, in lambda_handler
    trader.apply_trading_rule()
  File "/var/task/models/real_trader.py", line 51, in apply_trading_rule
    self.__play_scalping_trade(candles)
  File "/var/task/models/real_trader.py", line 143, in __play_scalping_trade
    new_stop: float = self.__drive_trail_process(candles.iloc[-2], last_indicators)
  File "/var/task/models/real_trader.py", line 182, in __drive_trail_process
    possible_stoploss: float = self.stoploss_method()(
  File "/var/task/models/real_trader.py", line 40, in stoploss_method
    return stoploss_strategy.STRATEGIES[self.config.stoploss_strategy_name]

V20Error on transactions

Followomg error occured.

Traceback (most recent call last):
  File "beta_cord.py", line 105, in <module>
    start_test_menu()
  File "beta_cord.py", line 79, in start_test_menu
    transactions = libra.request_massive_transactions()
  File "/home/sasaki/lab/py_fx/models/history_librarian.py", line67, in request_massive_transactions
    from_id, to_id = self.__client.request_transaction_ids()
  File "/home/sasaki/lab/py_fx/models/oanda_py_client.py", line 332, in request_transaction_ids
    response = self.__api_client.request(request_obj)
  File "/usr/local/pyenv/versions/20200222/lib/python3.8/site-packages/oandapyV20/oandapyV20.py", line 305, in request
    response = self.__request(method, url,
  File "/usr/local/pyenv/versions/20200222/lib/python3.8/site-packages/oandapyV20/oandapyV20.py", line 242, in __request
    raise V20Error(response.status_code,
oandapyV20.exceptions.V20Error: <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<meta http-equiv="refresh" content="0">

<title>api-fxpractice.oanda.com | 504: Gateway time-out</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>




</head>
<body>
<div id="cf-wrapper">

    

    <div id="cf-error-details" class="cf-error-details-wrapper">
        <div class="cf-wrapper cf-error-overview">
            <h1>
              
              <span class="cf-error-type">Error</span>
              <span class="cf-error-code">504</span>
              <small class="heading-ray-id">Ray ID: 5cad60b3ea83e11a &bull; 2020-08-30 09:10:26 UTC</small>
            </h1>
            <h2 class="cf-subheadline">Gateway time-out</h2>
        </div><!-- /.error-overview -->
        
        <div class="cf-section cf-highlight cf-status-display">
            <div class="cf-wrapper">
                <div class="cf-columns cols-3">
                  
<div id="cf-browser-status" class="cf-column cf-status-item cf-browser-status ">
  <div class="cf-icon-error-container">
    <i class="cf-icon cf-icon-browser"></i>
    <i class="cf-icon-status cf-icon-ok"></i>
  </div>
  <span class="cf-status-desc">You</span>
  <h3 class="cf-status-name">Browser</h3>
  <span class="cf-status-label">Working</span>
</div>

<div id="cf-cloudflare-status" class="cf-column cf-status-item cf-cloudflare-status ">
  <div class="cf-icon-error-container">
    <i class="cf-icon cf-icon-cloud"></i>
    <i class="cf-icon-status cf-icon-ok"></i>
  </div>
  <span class="cf-status-desc">Ashburn</span>
  <h3 class="cf-status-name">Cloudflare</h3>
  <span class="cf-status-label">Working</span>
</div>

<div id="cf-host-status" class="cf-column cf-status-item cf-host-status cf-error-source">
  <div class="cf-icon-error-container">
    <i class="cf-icon cf-icon-server"></i>
    <i class="cf-icon-status cf-icon-error"></i>
  </div>
  <span class="cf-status-desc">api-fxpractice.oanda.com</span>
  <h3 class="cf-status-name">Host</h3>
  <span class="cf-status-label">Error</span>
</div>

                </div>
              
            </div>
        </div><!-- /.status-display -->

        <div class="cf-section cf-wrapper">
            <div class="cf-columns two">
                <div class="cf-column">
                    <h2>What happened?</h2>
                    <p>The web server reported a gateway time-out error.</p>
                </div>
              
                <div class="cf-column">
                    <h2>What can I do?</h2>
                    <p>Please try again in a few minutes.</p>
                </div>
            </div>
              
        </div><!-- /.section -->

        <div class="cf-error-footer cf-wrapper">
  <p>
    <span class="cf-footer-item">Cloudflare Ray ID: <strong>5cad60b3ea83e11a</strong></span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Your IP</span>: 18.188.185.246</span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Performance &amp; security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>
    
  </p>
</div><!-- /.error-footer -->


    </div><!-- /#cf-error-details -->
</div><!-- /#cf-wrapper -->
</body>
</html>

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.