### JGT Data Refresh Service CLI Example (Bash) Source: https://context7_llms Provides an example of how to use the `jgtservice` command-line tool for a one-time data refresh, specifying the instrument and timeframe. ```bash # One-time refresh jgtservice --refresh-once -i EUR/USD -t H1 ``` -------------------------------- ### Bash Integration with Platform Commands Source: https://context7_llms This bash script shows how jgtpy CLI commands are integrated into platform workflows. It includes examples of how 'jgtapp' might be used to trigger IDS and CDS generation for fresh data, likely called by other systems or scanning processes. These commands facilitate automated data processing within the JGT ecosystem. ```bash # Called by jgtml for fresh data jgtapp ids EUR/USD H4 # Called by scanning systems jgtapp cds SPX500 D1 --fresh ``` -------------------------------- ### Standard Workflow Visualization Source: https://context7_llms Illustrates the data flow through the jgtpy processing pipeline, starting from raw price data and ending with signal detection. ```text Raw Price Data (PDS) → Indicator Calculation (IDS) → Signal Processing (CDS) → Analysis Output (ADS) → Chart Generation → Signal Detection ``` -------------------------------- ### Bash CLI Commands for jgtpy Source: https://context7_llms This bash script demonstrates the primary commands for the jgtpy command-line interface (CLI). It covers generating Indicator Data Service (IDS), Chart Data Service (CDS), and Analysis Data Service (ADS) data with various options for data freshness and completeness. These commands are essential for interacting with the jgtpy data processing pipeline. ```bash # Generate IDS data jgtpycli ids -i EUR/USD -t H4 --fresh # Generate CDS with charts jgtpycli cds -i SPX500 -t D1 --full # Generate ADS analysis jgtpycli ads -i GBP/USD -t H1 --fresh ``` -------------------------------- ### Command Line Interface (CLI) Source: https://context7_llms Guidance on using the jgtpy command-line interface for various operations and accessing documentation. ```APIDOC ## CLI Commands ### Description Commands to interact with the jgtpy service via the command line. ### Method CLI Command ### Endpoint N/A ### Usage - `jgtservice --daemon --all`: Starts the service in continuous daemon mode. - `jgtservice --web --port 8080`: Starts the Web API server on the specified port. - `jgtservice --status`: Checks the current status of the service. - `guidecli_jgtpy --list`: Shows all available sections in the CLI guidance. - `guidecli_jgtpy --section `: Shows a specific section of the CLI guidance (e.g., `guidecli_jgtpy --section jgtmouthwater`). ``` -------------------------------- ### Data Preparation for Signal Scanning (Python) Source: https://context7_llms Demonstrates how jgtml utilizes jgtpy to fetch and prepare indicator data (IDS) for signal scanning. It uses the `jgtapyhelper` module to create dataframes from price data files. ```python # jgtml calls jgtpy for data preparation from jgtpy import jgtapyhelper as th # Get fresh IDS data for signal scanning df = th.create_from_pds_file(instrument, timeframe, use_fresh=True) # Extract signal bars for analysis signal_bar, current_bar = get_last_two_bars(df) ``` -------------------------------- ### CLI Usage for Data Generation in jgtapp (Python) Source: https://context7_llms Demonstrates how `jgtapp` orchestrates data processing workflows using command-line interfaces provided by jgtpy. It shows commands for generating fresh IDS and CDS data. ```python # jgtapp orchestrates data processing workflows from jgtpy.jgtpyconstants import IDSCLI_PROG_NAME, CDSCLI_PROG_NAME import subprocess # Generate fresh IDS data subprocess.run([IDSCLI_PROG_NAME, '-i', instrument, '-t', timeframe, '--fresh']) # Generate CDS for charting subprocess.run([CDSCLI_PROG_NAME, '-i', instrument, '-t', timeframe, '--full']) ``` -------------------------------- ### Data Flow from jgtfxcon to jgtpy (Python) Source: https://context7_llms Shows how jgtpy receives raw market data from `jgtfxcon` and processes it into indicator data. It uses `jgtfxcon.getPH` for raw data and `jgtapyhelper.create_from_df` for processing. ```python # jgtfxcon provides raw market data import jgtfxcon raw_data = jgtfxcon.getPH(instrument, timeframe, quote_count) # jgtpy processes into indicators from jgtpy import jgtapyhelper as th indicators_data = th.create_from_df(raw_data) ``` -------------------------------- ### Python Service Layer Functions (jgtapyhelper.py) Source: https://context7_llms This Python code illustrates the usage of helper functions from the jgtapyhelper module for interacting with the Indicator Data Service (IDS). It shows how to create IDS from PDS files, read existing IDS data, and retrieve current bar information. Dependencies include the 'jgtpy' library and specific request objects. ```python from jgtpy import jgtapyhelper as th # Create IDS from PDS file df_ids = th.create_from_pds_file(rq=ids_request) # Read existing IDS data df_ids = th.read_ids(instrument, timeframe) # Get current bar data current_bar = th.read_ids_currentbar(instrument, timeframe, use_full=False) ``` -------------------------------- ### Python JGTIDSRequest Configuration Source: https://context7_llms This Python snippet shows how to configure the JGTIDSRequest object to control indicator calculations and data processing parameters. It allows specifying instruments, timeframes, and enabling/disabling specific indicators like MFI and Alligator variants. Requires the 'jgtpy' library. ```python from jgtpy.JGTIDSRequest import JGTIDSRequest rq = JGTIDSRequest() rq.instrument = "EUR/USD" rq.timeframe = "H4" rq.mfi_flag = True # Enable MFI calculation rq.balligator_flag = True # Enable Big Alligator rq.talligator_flag = True # Enable Tide Alligator rq.keep_bid_ask = False # Remove bid/ask columns ``` -------------------------------- ### Data Flow from jgtpy to jgtml (Python) Source: https://context7_llms Illustrates how `jgtml` consumes data processed by `jgtpy`, specifically adding Fractal Divergent Bar (FDB) signals. It uses the internal `_ids_add_fdb_column_logics_v2` function. ```python # jgtml uses jgtpy-processed data for signals from jgtpy.JGTIDS import _ids_add_fdb_column_logics_v2 # Get processed data with FDB signals df_with_fdb = _ids_add_fdb_column_logics_v2(indicators_data) ``` -------------------------------- ### IDS Column Naming Conventions (Python) Source: https://context7_llms Defines standard column naming conventions for various indicators and signals within the jgtpy Indicator Data Service (IDS), sourced from `jgtutils.jgtconstants`. ```python # Alligator indicators JAW, TEETH, LIPS # Regular Alligator (13-8-5) BJAW, BTEETH, BLIPS # Big Alligator (89-55-34) TJAW, TTEETH, TLIPS # Tide Alligator (377-233-144) # Oscillators AO, AC # Awesome/Accelerator Oscillators # Fractals (multiple degrees) FH, FL, FH3, FL3, FH5, FL5 # Fractal highs/lows FH8, FL8, FH13, FL13 # Higher degree fractals # ... up to FH89, FL89 # Market Facilitation Index MFI # Bill Williams MFI # Signal columns FDB, FDBB, FDBS # Fractal Divergent Bar signals ZONE_SIGNAL # Market zone identification ``` -------------------------------- ### Web API Endpoints Source: https://context7_llms This section details the available endpoints for the jgtpy Web API, allowing you to retrieve data, check service status, and trigger operations. ```APIDOC ## GET /api/v1/data/{instrument}/{timeframe} ### Description Retrieve historical CDS data for a specified instrument and timeframe. ### Method GET ### Endpoint /api/v1/data/{instrument}/{timeframe} ### Parameters #### Path Parameters - **instrument** (string) - Required - The financial instrument identifier. - **timeframe** (string) - Required - The data timeframe (e.g., '1h', '1d'). ### Response #### Success Response (200) - **data** (array) - Array of CDS data points. - **instrument** (string) - The requested instrument. - **timeframe** (string) - The requested timeframe. #### Response Example ```json { "data": [ {"timestamp": "2023-10-27T10:00:00Z", "value": 0.5}, {"timestamp": "2023-10-27T11:00:00Z", "value": 0.51} ], "instrument": "EUR/USD", "timeframe": "1h" } ``` ``` ```APIDOC ## GET /api/v1/data/{instrument}/{timeframe}/latest ### Description Retrieve the latest data point for a specified instrument and timeframe. ### Method GET ### Endpoint /api/v1/data/{instrument}/{timeframe}/latest ### Parameters #### Path Parameters - **instrument** (string) - Required - The financial instrument identifier. - **timeframe** (string) - Required - The data timeframe (e.g., '1h', '1d'). ### Response #### Success Response (200) - **timestamp** (string) - The timestamp of the latest data point. - **value** (number) - The value of the latest data point. - **instrument** (string) - The requested instrument. - **timeframe** (string) - The requested timeframe. #### Response Example ```json { "timestamp": "2023-10-27T11:00:00Z", "value": 0.51, "instrument": "EUR/USD", "timeframe": "1h" } ``` ``` ```APIDOC ## GET /api/v1/status ### Description Retrieve the current status of the jgtpy service. ### Method GET ### Endpoint /api/v1/status ### Response #### Success Response (200) - **status** (string) - The current status of the service (e.g., 'running', 'idle'). #### Response Example ```json { "status": "running" } ``` ``` ```APIDOC ## GET /api/v1/health ### Description Check the health of the jgtpy service. ### Method GET ### Endpoint /api/v1/health ### Response #### Success Response (200) - **health** (string) - Health status indicator (e.g., 'ok'). #### Response Example ```json { "health": "ok" } ``` ``` ```APIDOC ## POST /api/v1/refresh ### Description Trigger a data refresh operation for the jgtpy service. ### Method POST ### Endpoint /api/v1/refresh ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the refresh has been triggered. #### Response Example ```json { "message": "Refresh triggered successfully." } ``` ``` ```APIDOC ## GET /api/v1/metrics ### Description Retrieve processing metrics for the jgtpy service. ### Method GET ### Endpoint /api/v1/metrics ### Response #### Success Response (200) - **metrics** (object) - An object containing various processing metrics. #### Response Example ```json { "metrics": { "processing_time_seconds": 8.5, "memory_usage_mb": 120 } } ``` ``` ```APIDOC ## GET /docs ### Description Access the API documentation. ### Method GET ### Endpoint /docs ### Response #### Success Response (200) - Returns the API documentation in HTML format. #### Response Example (HTML content of the documentation) ``` -------------------------------- ### Python Indicator and CDS Generation (JGTIDS.py) Source: https://context7_llms This Python code snippet demonstrates how to use the JGTIDS module to add technical indicators to a price data DataFrame and convert it to the Chart Data Service (CDS) format. It requires the 'jgtpy' library and a price_data DataFrame. ```python from jgtpy.JGTIDS import ids_add_indicators, tocds # Generate IDS with indicators df_with_indicators = ids_add_indicators(price_data, quiet=True) # Generate full CDS with signals df_cds = tocds(price_data, quiet=True) ``` -------------------------------- ### CSV Signal Data Source: https://context7_llms This CSV data defines various trading signals, their descriptions, and associated columns. It serves as a reference for understanding the signals processed by the jgtpy package. ```csv Name;Title;Description;Question;Notes fdb;Fractal Divergent Bar Code;Fractal Divergent Bar Code (contains the signal value either buy, sell or nothing);; bdb fdbs;Fractal Divergent Bar Sell;Fractal Divergent Bar Sell;; Bearish Divergent Bar fdbb;Fractal Divergent Bar Buy;Fractal Divergent Bar Buy;; Bullish Divergent Bar acs;AC Deceleration Sell;AC Deceleration Sell;; acb;AC Acceleration Buy;AC Acceleration Buy;; fs;Fractal Sell;Fractal Sell;Can the representation be optimized ? Enhanced ?; fb;Fractal Buy;Fractal Buy;; zlc b;Zero Line Crossing Buy;Zero Line Crossing Buy;; zlcs;Zero Line Crossing Sell;Zero Line Crossing Sell;; zcol;Zero Line Crossing;Zero Line Crossing (Not sure if this is a signal);How many bars were there since last cross signal of the opposite direction ? How is the relationship of this signal profit and this number of bars ?; Number of bars before last cross when another type of signal was generated could be a learning sz;Zone Signal Sell;Zone Signal Sell;; bz;Zone Signal Buy;Zone Signal Buy;; ss;Saucer Sell;Saucer Sell;; sb;Saucer Buy;Saucer Buy;; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.