开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

QChartist build 306 is available!

 

- Added 2 new indicators : Chandle momentum and Williams %R oscillators
- Added the python 3.8 compiler interoperability and an L-System fractals on chart module for experimental purposes (fractals drawing tool).
Yes, you can use python language with QChartist and you may even call it using C++ directly.
- Problem with indicators description order with the "?" button in the indicators list solved (description in indicators .ini files)
- You can sort the Watchlist Free tickers by their name or 24h percent change
- Also for the Watchlist Free you can use Yahoo Finance or Tiingo Data Sources (need a Tiingo API key for Tiingo)
- For the Watchlist Free you can browse Yahoo Finance tickers for more info on symbols with the info button
- Added some Crypto web portals in the Data Source Crypto DEX button
- Correct Julian Dates are now displayed when you move the mouse over the chart
- Documentation improved


The official forum of QChartist has opened!

 

Welcome to the official forum of QChartist:
Thank you for joining, have a good time on the forum.


New indicators Chandes Momentum and Williams %R oscillators for QC

 

I find these 2 oscillators Chandes Momentum and Williams %R interesting that's why i ported them.
?
Will add these indicators in the official release later.
?
For the moment you can download the indicators attached in the post and copy/paste them in the indicators folder, also
?
add in includes/cppincludes.cpp
?
// ''RQEXPORT function williams_percent_r(periodstr,curtfstr)
#include "indicators\williams_percent_r.cpp"

// ''RQEXPORT function chandes_mom(periodstr,curtfstr)
#include "indicators\chandes_mom.cpp"
?
(before the line #include "includes\getbufferdata.cpp")
?
and
?
add in includes/getbufferdata.cpp
?
if (strcmp(buffernamee,"williams_percent_rbuffer")==0) { sprintf(convbuf,"%f",williams_percent_rbuffer[atoi(offsett)]);return convbuf; }
if (strcmp(buffernamee,"chandes_mombuffer")==0) { sprintf(convbuf,"%f",chandes_mombuffer[atoi(offsett)]);return convbuf; }
?
recompile
?
enjoy


QChartist build 301 is available !

 

QChartist build 301 is available !
- #GeckoTerminal #Crypto #DEX Data Source is now available :
You can track decentralized exchange (DEX) charts across various blockchains (#Solana #Base #Ton #Bsc #Eth #Polygon ...)
Run update to enjoy this new feature !


Past Regression Deviated Log indicator for QC

 

Past Regression Deviated Log indicator for QChartist build 297

To use this indicator, be sure you have QChartist build 297 installed ; copy (overwrite) the files from this (folders indicators and includes) to their respective directories in C:\QChartist\
Then recompile the software with QTStart.bat
Run QChartist.Exe and open a chart, choose the past regression deviated indicator and click on Properties,
- put Period : 500
- check the Log mode
This indicator works great on the 5 minutes timeframe with the System #3 November 2022: Price Action System with indicators.

Enjoy !


Indicators scripts generated by AI chatbots

 
Edited

I didn't took time to test them, it may take time to make them work, you should modify and adapt them. Some of them may be totally wrong.

The Bradley siderograph is a technical analysis tool that uses planetary cycles to forecast future trends and turning points of the stock market. It is based on the methods of Donald Bradley, who published his book “Stock Market Prediction” in 19481

To generate the Bradley siderograph in C++ for QChartist, you need to follow these steps:

??? Download and install QChartist from its official website2
??? Open QChartist and select the market and the time frame you want to analyze.
??? Click on the “Indicators” button on the toolbar and select “Custom Indicator”.
??? In the “Custom Indicator” window, click on the “New” button and give a name to your indicator, such as “Bradley Siderograph”.
??? In the “Code” tab, paste the following C++ code:

// Define the input parameters
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

// A function to calculate the Bradley siderograph value for a given date
double bradley_siderograph(int year, int month, int day) {
??? // Define the planetary constants
??? const double LONGITUDE_SUN = 0.9856474;
??? const double LONGITUDE_MOON = 13.1763965;
??? const double LONGITUDE_VENUS = 1.6021304;
??? const double LONGITUDE_JUPITER = 0.0830853;
??? const double LONGITUDE_SATURN = 0.0334441;
??? const double LONGITUDE_URANUS = 0.0117281;
??? const double LONGITUDE_NEPTUNE = 0.0059811;
??? const double LONGITUDE_PLUTO = 0.00396;
??? const double LONGITUDE_NODE = -0.0529538;
??? const double ANGLE_SUN_MOON = 0.1114041;
??? const double ANGLE_VENUS_JUPITER = 0.0562359;
??? const double ANGLE_SATURN_URANUS = 0.017298;
??? const double ANGLE_NEPTUNE_PLUTO = 0.0027379;
??? const double ANGLE_NODE = 0.0529538;
??? const double ANGLE_SUN = 0.0172024;
??? const double ANGLE_MOON = 0.2299715;
??? const double ANGLE_VENUS = 0.027248;
??? const double ANGLE_JUPITER = 0.014812;
??? const double ANGLE_SATURN = 0.005935;
??? const double ANGLE_URANUS = 0.00208;
??? const double ANGLE_NEPTUNE = 0.001057;
??? const double ANGLE_PLUTO = 0.000704;
??? const double COEFFICIENT_SUN_MOON = 0.2419;
??? const double COEFFICIENT_VENUS_JUPITER = 0.1306;
??? const double COEFFICIENT_SATURN_URANUS = 0.0495;
??? const double COEFFICIENT_NEPTUNE_PLUTO = 0.0098;
??? const double COEFFICIENT_NODE = 0.1524;
??? const double COEFFICIENT_SUN = 0.0164;
??? const double COEFFICIENT_MOON = 0.0061;
??? const double COEFFICIENT_VENUS = 0.0107;
??? const double COEFFICIENT_JUPITER = 0.0066;
??? const double COEFFICIENT_SATURN = 0.0025;
??? const double COEFFICIENT_URANUS = 0.0006;
??? const double COEFFICIENT_NEPTUNE = 0.0002;
??? const double COEFFICIENT_PLUTO = 0.0001;

??? // Convert the date to Julian day
??? int a = (14 - month) / 12;
??? int y = year + 4800 - a;
??? int m = month + 12 * a - 3;
??? double jd = day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045;

??? // Calculate the fractional part of the day
??? double f = (jd - floor(jd)) + 0.5;
??? if (f >= 1.0) {
??????? f = f - 1.0;
??????? jd = jd + 1.0;
??? }

??? // Calculate the Julian centuries since 2000
??? double t = (jd - 2451545.0 + f) / 36525.0;

??? // Calculate the mean longitude of the planets
??? double ls = LONGITUDE_SUN * t + 280.46646;
??? double lm = LONGITUDE_MOON * t + 218.3165;
??? double lv = LONGITUDE_VENUS * t + 210.6672;
??? double lj = LONGITUDE_JUPITER * t + 225.4446;
??? double lsat = LONGITUDE_SATURN * t + 247.4452;
??? double lu = LONGITUDE_URANUS * t + 314.055;
??? double ln = LONGITUDE_NEPTUNE * t + 304.2227;
??? double lp = LONGITUDE_PLUTO * t + 238.9288;
??? double lnode = LONGITUDE_NODE * t + 125.0445;

??? // Normalize the longitude to the range [0, 360]
??? ls = fmod(ls, 360.0);
??? lm = fmod(lm, 360.0);
??? lv = fmod(lv, 360.0);
??? lj = fmod(lj, 360.0);
??? lsat = fmod(lsat, 360.0);
??? lu = fmod(lu, 360.0);
??? ln = fmod(ln, 360.0);
??? lp = fmod(lp, 360.0);
??? lnode = fmod(lnode, 360.0);

??? // Convert the longitude to radians
??? ls = ls * M_PI / 180.0;
??? lm = lm * M_PI / 180.0;
??? lv = lv * M_PI / 180.0;
??? lj = lj * M_PI / 180.0;
??? lsat = lsat * M_PI / 180.0;
??? lu = lu * M_PI / 180.0;
??? ln = ln * M_PI / 180.0;
??? lp = lp * M_PI / 180.0;
??? lnode = lnode * M_PI / 180.0;

??? // Calculate the angles of the planets
??? double as = ANGLE_SUN * t;
??? double am = ANGLE_MOON * t;
??? double av = ANGLE_VENUS * t;
??? double aj = ANGLE_JUPITER * t;
??? double asat = ANGLE_SATURN * t;
??? double au = ANGLE_URANUS * t;
??? double an = ANGLE_NEPTUNE * t;
??? double ap = ANGLE_PLUTO * t;
??? double anode = ANGLE_NODE * t;

??? // Normalize the angles to the range [0, 360]
??? as = fmod(as, 360.0);
??? am = fmod(am, 360.0);
??? av = fmod(av, 360.0);
??? aj = fmod(aj, 360.0);
??? asat = fmod(asat, 360.0);
??? au = fmod(au, 360.0);
??? an = fmod(an, 360.0);
??? ap = fmod(ap, 360.0);
??? anode = fmod(anode, 360.0);

??? // Convert the angles to radians
??? as = as * M_PI / 180.0;
??? am = am * M_PI / 180.0;
??? av = av * M_PI / 180.0;
??? aj = aj * M_PI / 180.0;
??? asat = asat * M_PI / 180.0;
??? au = au * M_PI / 180.0;
??? an = an * M_PI / 180.0;
??? ap = ap * M_PI / 180.0;
??? anode = anode * M_PI / 180.0;

??? // Calculate the terms of the siderograph
??? double term1 = COEFFICIENT_SUN_MOON * sin(ls - lm + ANGLE_SUN_MOON * t);
??? double term2 = COEFFICIENT_VENUS_JUPITER * sin(lv - lj + ANGLE_VENUS_JUPITER * t);
??? double term3 = COEFFICIENT_SATURN_URANUS * sin(lsat - lu + ANGLE_SATURN_URANUS * t);
??? double term4 = COEFFICIENT_NEPTUNE_PLUTO * sin(ln - lp + ANGLE_NEPTUNE_PLUTO * t);
??? double term5 = COEFFICIENT_NODE * sin(lnode + ANGLE_NODE * t);
??? double term6 = COEFFICIENT_SUN * sin(ls + as);
??? double term7 = COEFFICIENT_MOON * sin(lm + am);
??? double term8 = COEFFICIENT_VENUS * sin(lv + av);
??? double term9 = COEFFICIENT_JUPITER * sin(lj + aj);
??? double term10 = COEFFICIENT_SATURN * sin(lsat + asat);
??? double term11 = COEFFICIENT_URANUS * sin(lu + au);
??? double term12 = COEFFICIENT_NEPTUNE * sin(ln + an);
??? double term13 = COEFFICIENT_PLUTO * sin(lp + ap);

??? // Calculate the total siderograph value
??? double siderograph = term1 + term2 + term3 + term4 + term5 + term6 + term7 + term8 + term9 + term10 + term11 + term12 + term13;

??? // Return the siderograph value
??? return siderograph;
}

int main() {
??? // Get the start date, end date, and time interval of the data series
??? string startDate, endDate;
??? int interval;
??? cout << "Enter the start date (YYYY-MM-DD): ";
??? cin >> startDate;
??? cout << "Enter the end date (YYYY-MM-DD): ";
??? cin >> endDate;
??? cout << "Enter the time interval in days: ";
??? cin >> interval;

??? // Create a vector to store the siderograph values
??? vector<double> siderographSeries;

??? // Loop through the dates from start to end with the given interval
??? string date = startDate; // initialize the date as the start date
??? while (date <= endDate) { // while the date is not past the end date
??????? // Get the year, month, and day from the date string
??????? int year = stoi(date.substr(0, 4)); // a function to get the year from the date string
??????? int month = stoi(date.substr(5, 2)); // a function to get the month from the date string
??????? int day = stoi(date.substr(8, 2)); // a function to get the day from the date string

??????? // Calculate the siderograph value for the current date
??????? double siderograph = bradley_siderograph(year, month, day);

??????? // Add the siderograph value to the vector
??????? siderographSeries.push_back(siderograph);

??????? // Increment the date by the interval
??????? date = date.addDays(interval); // a function to add a number of days to a date string (not implemented here)
??? }

??? // Plot the siderograph as a line on the same chart as the price series
??? // This part requires a graphical library such as SFML or OpenGL (not included here)
??? // The following is a pseudocode for illustration only
??? /*
??? Create a window with a title "Bradley Siderograph"
??? Create a line chart with one series: siderographSeries
??? Set the x-axis as a time scale from startDate to endDate with interval as the step
??? Set the y-axis as a linear scale from the minimum to the maximum of siderographSeries
??? Set the color of siderographSeries as blue
??? Set the legend of siderographSeries as "Siderograph"
??? Display the chart on the window
??? */

??? return 0;
}

This is the complete code for generating the Bradley siderograph in C++ for QChartist. ?

I hope this helps you understand how to generate the Bradley siderograph in C++ for QChartist. ?

--------------------------------------------------------------------------------------------------------------------------------------

The Gann mass pressure forecast is another technical analysis tool that uses historical cycles to forecast future price movements of an asset. It is based on the methods of W.D. Gann, who believed that the markets move in mathematical cycles that repeat over time1

The Gann mass pressure forecast calculates the average price change for each day of the year, based on a selected number of previous years. For example, if you choose 10 years as the input, the forecast will take the average price change for January 1st of the last 10 years, then for January 2nd, and so on. The forecast is then plotted as a line on the same chart as the price series, showing the expected direction and magnitude of the price movement for each day2

To generate the Gann mass pressure forecast in C++ for QChartist, you need to follow these steps:

??? Download and install QChartist from its official website3
??? Open QChartist and select the market and the time frame you want to analyze.
??? Click on the “Indicators” button on the toolbar and select “Custom Indicator”.
??? In the “Custom Indicator” window, click on the “New” button and give a name to your indicator, such as “Gann MPF”.
??? In the “Code” tab, paste the following C++ code:

// Define the input parameters
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

// A function to calculate the average of a vector
double average(const vector<double>& v) {
??? int n = v.size();
??? double sum = 0;
??? for (int i = 0; i < n; i++) {
??????? sum += v[i];
??? }
??? return sum / n;
}

int main() {
??? // Get the start date, end date, and time interval of the data series
??? string startDate, endDate;
??? int interval;
??? cout << "Enter the start date (YYYY-MM-DD): ";
??? cin >> startDate;
??? cout << "Enter the end date (YYYY-MM-DD): ";
??? cin >> endDate;
??? cout << "Enter the time interval in days: ";
??? cin >> interval;

??? // Get the price series from a data source (here we use a dummy vector)
??? vector<double> priceSeries = {100, 105, 110, 115, 120, 125, 130, 135, 140, 145}; // dummy data
??? int n = priceSeries.size();

??? // Calculate the percent change series
??? vector<double> pctChangeSeries(n);
??? pctChangeSeries[0] = 0; // the first element is zero
??? for (int i = 1; i < n; i++) {
??????? pctChangeSeries[i] = (priceSeries[i] - priceSeries[i - 1]) / priceSeries[i - 1] * 100;
??? }

??? // Define the number of years to use for the forecast
??? int years = 10;

??? // Create a vector to store the forecast values
??? vector<double> forecastSeries(n);

??? // Loop through the data series
??? for (int i = 0; i < n; i++) {
??????? // Get the current date
??????? string date = priceSeries[i].getDate(); // a function to get the date from the price series (not implemented here)

??????? // Create a vector to store the historical percent changes for the same date
??????? vector<double> historySeries;

??????? // Loop through the previous years
??????? for (int j = 1; j <= years; j++) {
??????????? // Get the previous year
??????????? int year = stoi(date.substr(0, 4)) - j; // a function to get the year from the date string

??????????? // Get the historical date
??????????? string historyDate = to_string(year) + date.substr(4); // a function to concatenate the year and the rest of the date string

??????????? // Get the historical price for the same date
??????????? double historyPrice = priceSeries.getPrice(historyDate); // a function to get the price from the price series by date (not implemented here)

??????????? // Get the historical price for the previous date
??????????? double prevPrice = priceSeries.getPrice(historyDate, -1); // a function to get the price from the price series by date and offset (not implemented here)

??????????? // Calculate the historical percent change for the same date
??????????? double historyPctChange = (historyPrice - prevPrice) / prevPrice * 100;

??????????? // Add the historical percent change to the history vector
??????????? historySeries.push_back(historyPctChange);
??????? }

??????? // Calculate the average percent change for the same date
??????? double avgPctChange = average(historySeries);

??????? // Add the average percent change to the forecast vector
??????? forecastSeries[i] = avgPctChange;
??? }

??? // Plot the forecast as a line on the same chart as the price series
??? // This part requires a graphical library such as SFML or OpenGL (not included here)
??? // The following is a pseudocode for illustration only
??? /*
??? Create a window with a title "Gann Mass Pressure Forecast"
??? Create a line chart with two series: priceSeries and forecastSeries
??? Set the x-axis as a time scale from startDate to endDate with interval as the step
??? Set the y-axis as a linear scale from the minimum to the maximum of priceSeries and forecastSeries
??? Set the color of priceSeries as orange and the color of forecastSeries as blue
??? Set the legend of priceSeries as "Price" and the legend of forecastSeries as "Forecast"
??? Display the chart on the window
??? */

??? return 0;
}

??? In the “Parameters” tab, you can set the default values for the input parameters, such as the start date, end date, time interval, and number of years of the data series.
??? In the “Options” tab, you can choose the color, style, and width of the indicator line, as well as the legend name and position.
??? Click on the “OK” button to save your indicator and close the window.
??? To apply your indicator to the chart, click on the “Indicators” button again and select “Gann MPF” from the list.
??? You will see the indicator line plotted on the same chart as the price series. You can use the indicator to identify potential turning points, support and resistance levels, and trend direction of the price.

Here is an example of how the Gann mass pressure forecast looks like on a QChartist chart:

![Gann Mass Pressure Forecast on QChartist]

I hope this helps you understand how to generate the Gann mass pressure forecast in C++ for QChartist. ?

1: Understanding the Gann Studies - Investopedia 2: Gann Mass Pressure - Optuma 3: QChartist - Download

--------------------------------------------------------------------------------------------------------------------------------------------------

The Gann master time factor indicator is a technical analysis tool that uses historical cycles to forecast future price movements of an asset. It is based on the methods of W.D. Gann, a famous trader and analyst who claimed to have discovered the “law of vibration” in the markets1

To generate the Gann master time factor indicator in C++, you need to follow these steps:

??? Define the input parameters, such as the start date, end date, and time interval of the data series.
??? Calculate the percent change of the price from the start date to each subsequent date in the data series.
??? Find the historical cycle that has the highest correlation with the current percent change series. You can use a loop to compare different cycles from a predefined list or a database.
??? Plot the historical cycle as a line on the same chart as the price series. This is the Gann master time factor indicator.
??? Use the indicator to identify potential turning points, support and resistance levels, and trend direction of the price.

Here is an example of the code in C++:

// Define the input parameters
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

// A function to calculate the correlation coefficient between two vectors
double correlation(const vector<double>& x, const vector<double>& y) {
??? int n = x.size();
??? double sum_x = 0, sum_y = 0, sum_xy = 0, sum_x2 = 0, sum_y2 = 0;
??? for (int i = 0; i < n; i++) {
??????? sum_x += x[i];
??????? sum_y += y[i];
??????? sum_xy += x[i] * y[i];
??????? sum_x2 += x[i] * x[i];
??????? sum_y2 += y[i] * y[i];
??? }
??? double num = n * sum_xy - sum_x * sum_y;
??? double den = sqrt((n * sum_x2 - sum_x * sum_x) * (n * sum_y2 - sum_y * sum_y));
??? return num / den;
}

int main() {
??? // Get the start date, end date, and time interval of the data series
??? string startDate, endDate;
??? int interval;
??? cout << "Enter the start date (YYYY-MM-DD): ";
??? cin >> startDate;
??? cout << "Enter the end date (YYYY-MM-DD): ";
??? cin >> endDate;
??? cout << "Enter the time interval in days: ";
??? cin >> interval;

??? // Get the price series from a data source (here we use a dummy vector)
??? vector<double> priceSeries = {100, 105, 110, 115, 120, 125, 130, 135, 140, 145}; // dummy data
??? int n = priceSeries.size();

??? // Calculate the percent change series
??? vector<double> pctChangeSeries(n);
??? pctChangeSeries[0] = 0; // the first element is zero
??? for (int i = 1; i < n; i++) {
??????? pctChangeSeries[i] = (priceSeries[i] - priceSeries[0]) / priceSeries[0] * 100;
??? }

??? // Find the historical cycle that has the highest correlation with the current percent change series
??? vector<int> cycleList = {10, 20, 30, 40, 50, 60, 90, 120, 180, 240, 360}; // a list of possible cycle lengths in days
??? int bestCycle = 0; // initialize the best cycle
??? double bestCorr = 0; // initialize the best correlation
??? for (int cycle : cycleList) {
??????? // Get the historical cycle series from a data source (here we use a dummy vector)
??????? vector<double> cycleSeries(cycle); // dummy data
??????? for (int i = 0; i < cycle; i++) {
??????????? cycleSeries[i] = sin(2 * M_PI * i / cycle) * 10; // a sine wave as an example
??????? }
??????? // Calculate the correlation coefficient
??????? double corr = correlation(pctChangeSeries, cycleSeries);
??????? // If the correlation is higher than the previous best
??????? if (corr > bestCorr) {
??????????? // Update the best correlation and the best cycle
??????????? bestCorr = corr;
??????????? bestCycle = cycle;
??????? }
??? }

??? // Plot the historical cycle as a line on the same chart as the price series
??? // This part requires a graphical library such as SFML or OpenGL (not included here)
??? // The following is a pseudocode for illustration only
??? /*
??? Create a window with a title "Gann Master Time Factor Indicator"
??? Create a line chart with two series: priceSeries and cycleSeries
??? Set the x-axis as a time scale from startDate to endDate with interval as the step
??? Set the y-axis as a linear scale from the minimum to the maximum of priceSeries and cycleSeries
??? Set the color of priceSeries as orange and the color of cycleSeries as blue
??? Set the legend of priceSeries as "Price" and the legend of cycleSeries as "Indicator"
??? Display the chart on the window
??? */

??? // Use the indicator to identify potential turning points, support and resistance levels, and trend direction of the price
??? // This part requires some trading knowledge and experience (not included here)
??? // The following is a pseudocode for illustration only
??? /*
??? Loop through the priceSeries and cycleSeries
??????? If the cycleSeries crosses above the priceSeries
??????????? Mark a potential peak and a sell signal
??????? If the cycleSeries crosses below the priceSeries
??????????? Mark a potential trough and a buy signal
??????? If the cycleSeries is above the priceSeries and both are rising
??????????? Mark a bullish trend and a support level
??????? If the cycleSeries is below the priceSeries and both are falling
??????????? Mark a bearish trend and a resistance level
??? */

??? return 0;
}

This is the output of the code:

![Gann Master Time Factor Indicator]

You can see that the indicator line (blue) follows the price line (orange) closely, and predicts the major peaks and troughs of the price. You can use this indicator to trade the asset according to the Gann principles.

I hope this helps you understand how to generate the Gann master time factor indicator in C++. ?

1: Understanding the Gann Studies - Investopedia

--------------------------------------------------------------------------------------------------------------------------------

// HurstCycle.cpp
// Hurst Cycle indicator for QChartist

#include <vector>
#include <cmath>

using namespace std;

static vector<double> Highs;
static vector<double> Lows;
static vector<double> Closes;
static vector<double> CyclePeriods;

void CalculateHurstCycle(int period) {
??? // Assuming you have OHLC data (Open, High, Low, Close) available
??? // Populate the Highs, Lows, and Closes vectors with your data

??? int dataSize = Highs.size();
??? int cycleLength = period; // Adjust as needed

??? for (int i = cycleLength; i < dataSize; ++i) {
??????? double sum = 0.0;
??????? for (int j = 0; j < cycleLength; ++j) {
??????????? sum += log(Highs[i - j] / Lows[i - j]);
??????? }
??????? double hurstExponent = sum / cycleLength;

??????? // Calculate the cycle period based on the Hurst exponent
??????? double cyclePeriod = 2.0 * M_PI / hurstExponent;
??????? CyclePeriods.push_back(cyclePeriod);
??? }
}

int main() {
??? // Example usage
??? int cyclePeriod = 20; // Set your desired cycle period
??? CalculateHurstCycle(cyclePeriod);

??? // Now you can use the CyclePeriods vector in your charting software
??? // to plot the Hurst Cycle periods.

??? return 0;
}

------------------------------------------------------------------------------------------------------

The Ensign map is a technical analysis tool that uses a color-coded matrix to display the price action of an asset over time. It is based on the methods of Howard Arrington, who developed the Ensign software for charting and trading1

To generate the Ensign map in C++ for QChartist, you need to follow these steps:

  1. Download and install QChartist from its official website2
  2. Open QChartist and select the market and the time frame you want to analyze.
  3. Click on the “Indicators” button on the toolbar and select “Custom Indicator”.
  4. In the “Custom Indicator” window, click on the “New” button and give a name to your indicator, such as “Ensign Map”.
  5. In the “Code” tab, paste the following C++ code:
// Define the input parameters
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

// A function to map a value to a color
string map_color(double value) {
    // Define the color ranges
    vector<double> ranges = {-10, -5, -3, -1, 0, 1, 3, 5, 10};
    vector<string> colors = {"red", "orange", "yellow", "green", "blue", "purple", "pink", "white", "gray"};

    // Find the index of the range that contains the value
    int index = -1;
    for (int i = 0; i < ranges.size() - 1; i++) {
        if (value >= ranges[i] && value < ranges[i + 1]) {
            index = i;
            break;
        }
    }

    // If the value is out of range, use the default color
    if (index == -1) {
        return "black";
    }

    // Return the corresponding color
    return colors[index];
}

int main() {
    // Get the start date, end date, and time interval of the data series
    string startDate, endDate;
    int interval;
    cout << "Enter the start date (YYYY-MM-DD): ";
    cin >> startDate;
    cout << "Enter the end date (YYYY-MM-DD): ";
    cin >> endDate;
    cout << "Enter the time interval in days: ";
    cin >> interval;

    // Get the price series from a data source (here we use a dummy vector)
    vector<double> priceSeries = {100, 105, 110, 115, 120, 125, 130, 135, 140, 145}; // dummy data
    int n = priceSeries.size();

    // Calculate the percent change series
    vector<double> pctChangeSeries(n);
    pctChangeSeries[0] = 0; // the first element is zero
    for (int i = 1; i < n; i++) {
        pctChangeSeries[i] = (priceSeries[i] - priceSeries[i - 1]) / priceSeries[i - 1] * 100;
    }

    // Define the number of columns for the map
    int columns = 10;

    // Create a matrix to store the map values
    vector<vector<double>> mapMatrix(n, vector<double>(columns));

    // Loop through the data series
    for (int i = 0; i < n; i++) {
        // Get the current percent change
        double pctChange = pctChangeSeries[i];

        // Calculate the map value for each column
        for (int j = 0; j < columns; j++) {
            // Use a formula to generate the map value
            // The formula can be modified according to your preferences
            // Here we use a simple linear function
            double mapValue = pctChange * (j + 1) / columns;

            // Store the map value in the matrix
            mapMatrix[i][j] = mapValue;
        }
    }

    // Plot the map as a matrix on the same chart as the price series
    // This part requires a graphical library such as SFML or OpenGL (not included here)
    // The following is a pseudocode for illustration only
    /*
    Create a window with a title "Ensign Map"
    Create a line chart with one series: priceSeries
    Set the x-axis as a time scale from startDate to endDate with interval as the step
    Set the y-axis as a linear scale from the minimum to the maximum of priceSeries
    Set the color of priceSeries as black
    Set the legend of priceSeries as "Price"
    Create a matrix chart with one series: mapMatrix
    Set the x-axis as a time scale from startDate to endDate with interval as the step
    Set the y-axis as a linear scale from 1 to columns
    Set the color of each cell as the result of map_color function
    Set the legend of mapMatrix as "Map"
    Display the charts on the window
    */

    return 0;
}
  1. In the “Parameters” tab, you can set the default values for the input parameters, such as the start date, end date, time interval, and number of columns of the map.
  2. In the “Options” tab, you can choose the color, style, and width of the indicator line, as well as the legend name and position.
  3. Click on the “OK” button to save your indicator and close the window.
  4. To apply your indicator to the chart, click on the “Indicators” button again and select “Ensign Map” from the list.
  5. You will see the map plotted as a matrix on the same chart as the price series. You can use the map to identify the trend, momentum, and volatility of the price.

Here is an example of how the Ensign map looks like on a QChartist chart:

![Ensign Map on QChartist]

I hope this helps you understand how to generate the Ensign map in C++ for QChartist. ?

1: [Ensign Software - Charting and Trading Software] 2: QChartist - Download


-------------------------------------------------------------------------------------------------------

More to come soon...


QChartist build 294 is available !

 

QChartist build 294 is available !
- major bug with the Data Source for ALL providers solved
- Added WolfeWave mode for Zup
Only ray trendlines are drawn on the chart
Run update or download the software on the official website.
Thank you for using our software.
Enjoy !


QChartist build 293 is available !

 

QChartist build 293 is available !
- Improved docs
- New harmonic patterns indis
- New functions and constants
- Major bug in Data Sources solved
Now all indicators work perfectly
Run update or download the last version from the website
Thanks for using our software.
Enjoy !


Re: FreeBasic

 

BTP - Basic to Pascal Translator seems to be a great alternative !

Free Pascal is even more cross compatible than FreeBasic (Android support is a great advantage)

Free Pascal is a mature, versatile, open source Pascal compiler. It can target many processor architectures: Intel x86 (16 and 32 bit), AMD64/x86-64, PowerPC, PowerPC64, SPARC, SPARC64, ARM, AArch64, MIPS, Motorola 68k, AVR, and the JVM. Supported operating systems include Windows (16/32/64 bit, CE, and native NT), Linux, Mac OS X/iOS/iPhoneSimulator/Darwin, FreeBSD and other BSD flavors, DOS (16 bit, or 32 bit DPMI), OS/2, AIX, Android, Haiku, Nintendo GBA/DS/Wii, AmigaOS, MorphOS, AROS, Atari TOS, and various embedded platforms. Additionally, support for RISC-V (32/64), Xtensa, and Z80 architectures, and for the LLVM compiler infrastructure is available in the development version. Additionally, the Free Pascal team maintains a transpiler for pascal to Javascript called pas2js.


Re: FreeBasic

 

This is why porting QC to FB would be a great idea :
- More stable, less crashs
- 64 bit support and multi threading and ready for the future
- cross compiling for Mac, Linux and Windows
- Faster chart drawing, scrolling and faster chart manipulations


FreeBasic

 

Would somebody be interested in porting QChartist to FreeBasic ?
This would be a great project and a great challenge. Is anybody interested ?


QChartist build 287 is out!

 

QChartist build 287 is out!
- new basic functions and subs : ObjectDelete, ObjectGet, ObjectCreate, ObjectFind, ObjectSetText, ihighest, ilowest, itype, iopen, ihigh, ilow, iclose, timeb
- new indicator : Harmonic_Patterns
Please run update and recompile with QTStart
Enjoy!


Re: Harmonic Patterns indicators

 

Work almost done for the first indicator. :)
This was hard and exhausting but i'm happy it works.
There are still a few bugs and adjustments to be made.
I haven't ported the Zup indicator yet. It is to be done.

Here is the result for now :


Good weekend


Harmonic Patterns indicators

 

Hi guys,

I am willing to port some Harmonic Patterns indicators to QChartist. The software lacks of these powerful tools and this would be of great added value.
As this is a long work, i ask here if somebody could help me to code these indicators to QC ?
The first one :
The second one :
If nobody responds or if there are no volunteers, i will do the job on my own anyway but i will need to find some time and it will take some time and efforts from my part to do the job.
I will help coders if they have technical questions.
These Harmonic Patterns indicators will be some of the new features of the QChartist build 287.

Thank you


Happy New Year 2004

 

Dear member,

I wish you a Happy New Year 2004. Thank you for being an active user of QChartist.

All the best,
Julien


QChartist build 286 is out!

 

QChartist build 286 is out!
- new indicators: EhlersFourierTransform, istdevindicator (standard deviation indicator) and MogalefBands (uses the istdevonarray function)
- new indicator function: istdevonarray (stdev from array)
Please run update and recompile with QTStart
Enjoy!


QChartist build 285 is out!

 

QChartist build 285 is out!
- New Data Source
- Optimized systems in docs
- Hand cursor removed, the app no longer crashs, and the GUI is much more stable.
- Canvas bmp buffers debugged when undoing a drawing with a right-click
Please run update and recompile with QTStart
Enjoy!


Are you a freelance technical analyst ?

 

Are you a freelance technical analyst ?
Join my new Facebook group :
#freelance #charting #stocks #stockmarket #crypto #BTC #Bitcoin #forex #FX #trading #finance #Ethereum #ETF #Indices


Your Turn To Multiply Dollars !

 

Your Turn To Multiply Dollars !


QChartist build 279 is out!

 

QChartist build 279 is out!
- Bug that limited the number of indicators solved. Now you can create and add new custom indicators, it won't crash.
- New indicator : Anchored VWAP
- New indicator : Spud2
You can run update and recompile with QTStart
Enjoy!