Skip to content

Add CSV levels importer indicator - #174

Open
Phili33 wants to merge 1 commit into
AtasPlatform:Developfrom
Phili33:feature/csv-levels-importer
Open

Phili33 wants to merge 1 commit into
AtasPlatform:Developfrom
Phili33:feature/csv-levels-importer

Conversation

@Phili33

@Phili33 Phili33 commented Jun 28, 2026

Copy link
Copy Markdown

Francais

Objet

CsvLevelsImporter est un indicateur ATAS qui lit un fichier CSV local et affiche
des niveaux horizontaux ou des zones directement sur le graphique.

Fonctionnalites

  • Lecture de fichiers CSV avec separateur ; ou ,.
  • Support des niveaux simples via Price.
  • Support des zones via Price + Price2.
  • Labels, couleurs nommees et couleurs hexadecimales #RRGGBB.
  • Styles de ligne : solide, tirets, pointilles.
  • Rechargement automatique par FileSystemWatcher.
  • Rechargement periodique configurable.
  • Journalisation des erreurs dans le dossier CSV.

Format CSV

Price;Price2;Note;Color;LineType;LineWidth;TextAlign
25000;;Previous POC;gold;0;2;1
25120;25140;Volume zone;cyan;0;1;2
24950;;Support;#00FF88;1;2;0

LineType : 0 solide, 1 tirets, 2 pointilles.

TextAlign : 0 gauche, 1 droite, 2 centre.

Installation

  1. Copier Technical/CsvLevelsImporter.cs dans le dossier Technical du depot
    AtasPlatform/Indicators.
  2. Construire Technical/Indicators.Technical.csproj.
  3. Copier ATAS.Indicators.Technical.dll dans %APPDATA%\ATAS\Indicators.
  4. Redemarrer ATAS.

Le fichier deploy_csv_levels_importer.ps1 automatise les etapes 2 et 3.

English

Purpose

CsvLevelsImporter is an ATAS indicator that reads a local CSV file and draws
horizontal levels or price zones directly on the chart.

Features

  • Reads CSV files using either ; or , as separator.
  • Supports single levels through Price.
  • Supports zones through Price + Price2.
  • Supports labels, named colors, and hexadecimal #RRGGBB colors.
  • Supports solid, dashed, and dotted line styles.
  • Automatic reload through FileSystemWatcher.
  • Configurable periodic reload.
  • Error logging in the CSV directory.

CSV format

Price;Price2;Note;Color;LineType;LineWidth;TextAlign
25000;;Previous POC;gold;0;2;1
25120;25140;Volume zone;cyan;0;1;2
24950;;Support;#00FF88;1;2;0

LineType: 0 solid, 1 dashed, 2 dotted.

TextAlign: 0 left, 1 right, 2 center.

Installation

  1. Copy Technical/CsvLevelsImporter.cs into the Technical folder of the
    AtasPlatform/Indicators repository.
  2. Build Technical/Indicators.Technical.csproj.
  3. Copy ATAS.Indicators.Technical.dll to %APPDATA%\ATAS\Indicators.
  4. Restart ATAS.

deploy_csv_levels_importer.ps1 automates steps 2 and 3.

Pull request summary

Add CsvLevelsImporter, a technical indicator that imports chart levels and zones
from a local CSV file, plus a PowerShell deployment helper for local testing.

The indicator avoids user-specific paths by defaulting to:

Documents\ATAS\CsvLevels\levels.csv

The included CHANGELOG.md only documents this standalone ATAS CSV indicator.

@Stig4all

Stig4all commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

The file-loading behavior needs improvement before we can include this in the standard indicators.
The current implementation clears the displayed levels before successfully loading their replacement. A temporary read failure or partially written file can therefore remove valid levels from the chart. An empty or missing file also triggers another load on every calculation of the latest bar, bypassing the configured reload interval. File reads and retry sleeps run directly inside the calculation path.
Please retain the last successfully loaded snapshot, schedule reloads outside the calculation path, and throttle retries for empty or unavailable files. The new UI text also needs localization resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants