Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 6,582 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Active Threads | Active Posts | Unanswered Today | Since Yesterday | This Week
Starting with Zorro
4 hours ago
This strategy is an abstract example of decision-making from coupled graph geometry. It models the market using two different weighted graphs that represent two distinct kinds of structure:

1) A regime dynamics graph (Graph A)Graph A represents the market as a finite set of latent regimes (states). A directed edge from state ???? to state ???? encodes the likelihood that the market transitions from
???? to ????. Probabilities ???????????? are converted into edge “lengths” using an information-geometric map:

wij =?log(pij)

This turns the transition system into a metric-like space where likely transitions are short and unlikely transitions are long. Once edge lengths are defined, Floyd–Warshall computes shortest path distances between all state pairs, allowing indirect multi-step transitions to determine effective connectivity. The strategy then summarizes the global geometry of the regime space using a Wiener-like index—the sum of distances across all unordered state pairs. Conceptually, this measures whether the regime system is compact (states are mutually reachable through short, high-probability pathways) or diffuse (states are separated by long or improbable paths). A compact regime graph corresponds to more orderly, predictable evolution; a diffuse one corresponds to fragmented, noisy evolution.

2) An asset coupling graph (Graph B)

Graph B represents relationships among assets as an undirected weighted graph. Here, edge weights are derived from correlation:

wij ?=1?? corrij ??

Strongly correlated assets are “close” (small distance), while weakly related assets are “far.” Again, shortest paths produce an effective distance structure, and a Wiener-like sum over all asset pairs becomes a scalar measure of system-wide coupling. Low Wiener (tight graph) means assets behave as a single cluster—diversification is weak, and portfolio risk concentrates. Higher Wiener implies more separation and potentially better diversification.

3) Coupling the graphs into a single control variable The strategy’s mathematical core is a coupling rule that treats: Regime compactness as a proxy for signal quality / predictability, and Asset coupling as a proxy for systemic risk / lack of diversification.

It combines them through a logistic squashing function:

Score=?(??Compactness(StateGraph)???Coupling(AssetGraph))

The sigmoid ?(?) maps the result into [0,1], producing a risk throttle. Abstractly, the throttle increases when the regime space is geometrically “tight” (predictable transitions) and decreases when the asset space is geometrically “tight” (high correlation concentration). The outcome is not a specific entry/exit rule, but a mathematically grounded allocator: a mechanism that scales risk based on two interacting notions of structure—temporal structure in regime evolution and cross-sectional structure in asset dependence.

In short, the code demonstrates how global graph metrics (via shortest-path geometry and Wiener-like sums) can be used as compact, interpretable features to modulate trading aggressiveness in a principled, system-level way.

Code
// TGr05.cpp - Zorro64 Strategy DLL (C++) - Two coupled graphs for algo trading

#include <zorro.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define INF 1e30

// =============================== Graph (OO) ===============================
class WeightedGraph {
public:
  int n = 0;
  double* d = 0;   // adjacency/shortest-path matrix (n*n)

  WeightedGraph(int N) { init(N); }
  ~WeightedGraph() { shutdown(); }

  void init(int N) {
    shutdown();
    n = N;
    d = (double*)malloc((size_t)n*(size_t)n*sizeof(double));
    if(!d) quit("OOM: WeightedGraph matrix");
    reset();
  }

  void shutdown() {
    if(d) free(d);
    d = 0;
    n = 0;
  }

  inline int pos(int r,int c) const { return r*n + c; }

  void reset() {
    for(int r=0;r<n;r++)
      for(int c=0;c<n;c++)
        d[pos(r,c)] = (r==c) ? 0.0 : INF;
  }

  // Floyd-Warshall shortest paths
  void allPairsShortest() {
    for(int k=0;k<n;k++)
      for(int i=0;i<n;i++)
        for(int j=0;j<n;j++) {
          double cand = d[pos(i,k)] + d[pos(k,j)];
          if(cand < d[pos(i,j)]) d[pos(i,j)] = cand;
        }
  }

  // Wiener-like sum over unordered pairs (symmetrized)
  double wienerUndirectedLike() const {
    double W = 0.0;
    for(int i=0;i<n;i++)
      for(int j=i+1;j<n;j++) {
        double dij = d[pos(i,j)];
        double dji = d[pos(j,i)];
        W += 0.5*(dij + dji);
      }
    return W;
  }

  void dump(const char* title) const {
    printf("\n%s", title);
    for(int r=0;r<n;r++) {
      printf("\n");
      for(int c=0;c<n;c++) {
        double v = d[pos(r,c)];
        if(v > 1e20) printf("  INF ");
        else printf("%5.2f ", v);
      }
    }
  }
};

// ========================== Graph A: Markov State Graph ===================
// Edge weight = -log(p_ij)  (probability -> distance)
class RegimeMarkovGraph {
public:
  WeightedGraph G;

  RegimeMarkovGraph(int states) : G(states) {}

  static double probToDist(double p) {
    if(p <= 0.0) return INF;
    if(p > 1.0) p = 1.0;
    return -log(p);
  }

  void setTransitionProb(int i,int j,double p) {
    G.d[G.pos(i,j)] = probToDist(p);
  }

  // Example presets: directional vs choppy (toy)
  void buildDirectional4() {
    G.reset();
    setTransitionProb(0,0,0.65); setTransitionProb(0,1,0.30); setTransitionProb(0,2,0.04); setTransitionProb(0,3,0.01);
    setTransitionProb(1,0,0.25); setTransitionProb(1,1,0.60); setTransitionProb(1,2,0.12); setTransitionProb(1,3,0.03);
    setTransitionProb(2,0,0.03); setTransitionProb(2,1,0.12); setTransitionProb(2,2,0.60); setTransitionProb(2,3,0.25);
    setTransitionProb(3,0,0.01); setTransitionProb(3,1,0.04); setTransitionProb(3,2,0.30); setTransitionProb(3,3,0.65);
  }

  void buildChoppy4() {
    G.reset();
    setTransitionProb(0,0,0.28); setTransitionProb(0,1,0.24); setTransitionProb(0,2,0.25); setTransitionProb(0,3,0.23);
    setTransitionProb(1,0,0.23); setTransitionProb(1,1,0.27); setTransitionProb(1,2,0.26); setTransitionProb(1,3,0.24);
    setTransitionProb(2,0,0.24); setTransitionProb(2,1,0.26); setTransitionProb(2,2,0.27); setTransitionProb(2,3,0.23);
    setTransitionProb(3,0,0.25); setTransitionProb(3,1,0.23); setTransitionProb(3,2,0.24); setTransitionProb(3,3,0.28);
  }

  // Compactness: lower Wiener => more compact; convert to a score in [0,1]
  double compactnessScore() {
    G.allPairsShortest();
    double W = G.wienerUndirectedLike();
    // simple squash: smaller W => larger score
    return 1.0/(1.0 + W);
  }
};

// ========================== Graph B: Asset Relationship Graph =============
// Edge weight = 1 - |corr|  (strong corr => short distance)
class AssetCorrelationGraph {
public:
  WeightedGraph G;

  AssetCorrelationGraph(int assets) : G(assets) {}

  static double corrToDist(double corr) {
    double a = fabs(corr);
    if(a > 1.0) a = 1.0;
    return 1.0 - a; // in [0,1]
  }

  void setCorr(int i,int j,double corr) {
    double w = corrToDist(corr);
    G.d[G.pos(i,j)] = w;
    G.d[G.pos(j,i)] = w;
  }

  // Example 3-asset correlation structure (toy)
  // 0=EUR/USD, 1=GBP/USD, 2=USD/JPY
  void buildToyFX() {
    G.reset();
    // self already 0
    setCorr(0,1,0.85);  // EURUSD ~ GBPUSD high positive corr -> short distance
    setCorr(0,2,-0.30); // EURUSD vs USDJPY mild negative -> larger distance
    setCorr(1,2,-0.25); // GBPUSD vs USDJPY mild negative
  }

  // Coupling: lower Wiener => assets tightly coupled; convert to risk penalty in [0,1]
  double couplingPenalty() {
    G.allPairsShortest();
    double W = G.wienerUndirectedLike();
    // smaller W => higher coupling => higher penalty; invert & squash
    return 1.0/(1.0 + W);
  }
};

// ========================== Strategy: Coupled Two-Graph Logic =============
class TwoGraphStrategy {
public:
  // Hyperparameters
  double alpha = 2.0;   // weight for regime compactness
  double beta  = 1.5;   // weight for asset coupling penalty
  double baseRisk = 1.0;

  // Graphs
  RegimeMarkovGraph RG;
  AssetCorrelationGraph AG;

  TwoGraphStrategy() : RG(4), AG(3) {}

  static double sigmoid(double x) {
    // stable-ish sigmoid
    if(x > 30) return 1.0;
    if(x < -30) return 0.0;
    return 1.0/(1.0 + exp(-x));
  }

  // In a real system:
  // - RG transitions come from online Markov counts over price-action states
  // - AG correlations come from rolling returns correlations of assets
  // Here: toy graphs to demonstrate the coupling logic.
  void buildToyInputs(int useDirectional) {
    if(useDirectional) RG.buildDirectional4();
    else              RG.buildChoppy4();

    AG.buildToyFX();
  }

  // Coupling between two graphs in "mathematical context":
  // we treat RG.compactness as signal quality and AG.coupling as diversification risk.
  double riskThrottle() {
    double comp = RG.compactnessScore();   // higher = better / more predictable
    double coup = AG.couplingPenalty();    // higher = more coupled / more dangerous

    // combined score -> throttle in [0,1]
    double x = alpha*comp - beta*coup;
    return sigmoid(x);
  }

  void explain(double thr) {
    printf("\n\n[TwoGraph] Regime compactness score = %.4f", RG.compactnessScore());
    printf("\n[TwoGraph] Asset coupling penalty   = %.4f", AG.couplingPenalty());
    printf("\n[TwoGraph] Risk throttle (0..1)     = %.4f", thr);
    printf("\n[TwoGraph] Suggested Lots scale     = %.3f", baseRisk * (0.25 + 0.75*thr));
  }

  // Demo run: compare two regimes (directional vs choppy) under same asset coupling
  void demo() {
    // Case A: directional
    buildToyInputs(1);
    double thrA = riskThrottle();
    printf("\n=== CASE A: Directional regime ===");
    RG.G.dump("\nRegime graph shortest distances:");
    AG.G.dump("\nAsset graph shortest distances:");
    explain(thrA);

    // Case B: choppy
    buildToyInputs(0);
    double thrB = riskThrottle();
    printf("\n\n=== CASE B: Choppy regime ===");
    RG.G.dump("\nRegime graph shortest distances:");
    AG.G.dump("\nAsset graph shortest distances:");
    explain(thrB);

    printf("\n\nInterpretation:");
    printf("\n- If regime transitions are compact (predictable), throttle increases.");
    printf("\n- If assets are tightly coupled (low diversification), throttle decreases.");
    printf("\n- The trading engine can use throttle to scale order size / aggression.");
  }
};

// =============================== Entry ===================================
static TwoGraphStrategy* S = 0;

DLLFUNC void run()
{
  if(is(INITRUN))
  {
    if(!S) S = new TwoGraphStrategy();
    S->demo();
    quit("Done.");
  }
}
140 60,611 Read More
Starting with Zorro
5 hours ago
This following code demo shows how an HFT-style regime switch can be built from a microstructure/state-transition network instead of traditional indicators.

It treats market behavior as a small Markov transition graph (4 states in the demo, e.g., strong/weak bull vs bear). Each directed edge is a transition probability Pij, converted into a “distance” using log(Pij): high-probability transitions become short distances, low-probability transitions become long distances. It then runs Floyd–Warshall to compute all-pairs shortest paths, capturing not only direct transitions but also the best multi-step routes between states.

From that shortest-path matrix it computes a Wiener-like index (sum of pairwise distances), which acts as a single scalar connectivity/compactness score for the market-state network. In HFT terms, this can be interpreted as a fast regime classifier:

Low Wiener-like index (“compact”) ? transitions concentrate in a tight subset of states (more predictable flow). An HFT strategy might allow higher quote aggressiveness, tighter inventory risk limits, or trend-biased execution because the state evolution is stable.

High Wiener-like index (“diffuse”) ? transitions spread out and paths between states are longer (more random/choppy flow). An HFT strategy might de-risk, widen spreads, reduce order size, increase cancellation thresholds, or prefer mean-reversion/market-making defense because predictability is lower and adverse selection risk is higher.

Although the demo uses hardcoded “directional” vs “choppy” transition matrices, in a real HFT system those probabilities would be estimated online from tick/level-2 features (imbalance, trade sign, short returns, volatility bursts). The result is a lightweight, mathematically interpretable graph metric that can drive latency-sensitive risk controls and parameter switching in an HFT engine.


Code
// TGr01.cpp - Zorro64 Strategy DLL (C++) - Markov Graph Wiener-like Index demo

#include <zorro.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define INF 1e30

struct Graph {
  int n;
  double* d;
};

static int Graph_pos(const Graph* g, int r, int c) { return r*g->n + c; }

static Graph* Graph_create(int n) {
  Graph* g = (Graph*)malloc(sizeof(Graph));
  if(!g) return 0;
  g->n = n;
  g->d = (double*)malloc(n*n*sizeof(double));
  if(!g->d) { free(g); return 0; }
  return g;
}

static void Graph_destroy(Graph* g) {
  if(!g) return;
  if(g->d) free(g->d);
  free(g);
}

static void Graph_reset(Graph* g) {
  for(int r=0; r<g->n; r++)
    for(int c=0; c<g->n; c++)
      g->d[Graph_pos(g,r,c)] = (r==c) ? 0.0 : INF;
}

static double probToDist(double p) {
  if(p <= 0.0) return INF;
  if(p > 1.0) p = 1.0;
  return -log(p);
}

static void Graph_linkProb(Graph* g, int i, int j, double p) {
  g->d[Graph_pos(g,i,j)] = probToDist(p);
}

static void Graph_allPairsShortest(Graph* g) {
  for(int k=0; k<g->n; k++)
    for(int i=0; i<g->n; i++)
      for(int j=0; j<g->n; j++) {
        int ij = Graph_pos(g,i,j);
        int ik = Graph_pos(g,i,k);
        int kj = Graph_pos(g,k,j);
        double cand = g->d[ik] + g->d[kj];
        if(cand < g->d[ij]) g->d[ij] = cand;
      }
}

static double Graph_wienerUndirectedLike(const Graph* g) {
  double W = 0.0;
  for(int i=0; i<g->n; i++)
    for(int j=i+1; j<g->n; j++) {
      double dij = g->d[Graph_pos(g,i,j)];
      double dji = g->d[Graph_pos(g,j,i)];
      W += 0.5*(dij + dji);
    }
  return W;
}

static void Graph_dump(const Graph* g, const char* title) {
  printf("\n%s", title);
  for(int r=0; r<g->n; r++) {
    printf("\n");
    for(int c=0; c<g->n; c++) {
      double v = g->d[Graph_pos(g,r,c)];
      if(v > 1e20) printf("  INF ");
      else printf("%5.2f ", v);
    }
  }
}

static void buildDirectional(Graph* g) {
  Graph_reset(g);
  Graph_linkProb(g,0,0,0.65); Graph_linkProb(g,0,1,0.30); Graph_linkProb(g,0,2,0.04); Graph_linkProb(g,0,3,0.01);
  Graph_linkProb(g,1,0,0.25); Graph_linkProb(g,1,1,0.60); Graph_linkProb(g,1,2,0.12); Graph_linkProb(g,1,3,0.03);
  Graph_linkProb(g,2,0,0.03); Graph_linkProb(g,2,1,0.12); Graph_linkProb(g,2,2,0.60); Graph_linkProb(g,2,3,0.25);
  Graph_linkProb(g,3,0,0.01); Graph_linkProb(g,3,1,0.04); Graph_linkProb(g,3,2,0.30); Graph_linkProb(g,3,3,0.65);
}

static void buildChoppy(Graph* g) {
  Graph_reset(g);
  Graph_linkProb(g,0,0,0.28); Graph_linkProb(g,0,1,0.24); Graph_linkProb(g,0,2,0.25); Graph_linkProb(g,0,3,0.23);
  Graph_linkProb(g,1,0,0.23); Graph_linkProb(g,1,1,0.27); Graph_linkProb(g,1,2,0.26); Graph_linkProb(g,1,3,0.24);
  Graph_linkProb(g,2,0,0.24); Graph_linkProb(g,2,1,0.26); Graph_linkProb(g,2,2,0.27); Graph_linkProb(g,2,3,0.23);
  Graph_linkProb(g,3,0,0.25); Graph_linkProb(g,3,1,0.23); Graph_linkProb(g,3,2,0.24); Graph_linkProb(g,3,3,0.28);
}

static void printRiskSwitch(double Wdir, double Wchop, double Wnow) {
  double thr = 0.5*(Wdir + Wchop);
  printf("\n\nRisk switch example:");
  printf("\nDirectional W = %.3f", Wdir);
  printf("\nChoppy      W = %.3f", Wchop);
  printf("\nThreshold   W = %.3f", thr);
  printf("\nCurrent     W = %.3f", Wnow);
  if(Wnow <= thr)
    printf("\nDecision: COMPACT regime -> higher risk / trend bias.");
  else
    printf("\nDecision: DIFFUSE regime -> reduce risk / mean-revert or flat.");
}

static int doMain()
{
  const int STATES = 4;

  Graph* Gdir = Graph_create(STATES);
  if(!Gdir) { printf("\nOOM creating directional graph"); return 1; }
  buildDirectional(Gdir);
  Graph_allPairsShortest(Gdir);
  double Wdir = Graph_wienerUndirectedLike(Gdir);

  Graph* Gch = Graph_create(STATES);
  if(!Gch) { printf("\nOOM creating choppy graph"); Graph_destroy(Gdir); return 1; }
  buildChoppy(Gch);
  Graph_allPairsShortest(Gch);
  double Wchop = Graph_wienerUndirectedLike(Gch);

  double Wnow = Wchop; // demo choice

  Graph_dump(Gdir, "\nDirectional graph shortest distances (-log p) after Floyd:");
  printf("\n\nWiener-like index (directional) = %.3f\n", Wdir);

  Graph_dump(Gch, "\nChoppy graph shortest distances (-log p) after Floyd:");
  printf("\n\nWiener-like index (choppy)      = %.3f\n", Wchop);

  printRiskSwitch(Wdir, Wchop, Wnow);

  Graph_destroy(Gdir);
  Graph_destroy(Gch);
  return 0;
}

// Zorro DLL entry point
DLLFUNC void run()
{
  if(is(INITRUN)) {
    doMain();
    quit("Done.");
  }
}
140 60,611 Read More
Starting with Zorro
5 hours ago
The Wiener index W(G)—the sum of shortest-path distances over all unordered vertex pairs in a graph—can be a useful bridge between graph theory and quantitative trading when market structure is modeled as a network. In trading, we often represent relationships (between assets, regimes, indicators, or states) as a graph where vertices are “entities” (assets, features, Markov states) and edges encode similarity, influence, transition likelihood, or co-movement. In that setting, the Wiener index becomes a compact measure of global connectivity: low W(G) implies many pairs are “close” (information or influence travels quickly), while high W(G) implies a more “stretched” structure with longer average separations.

One direct application is regime monitoring. Suppose you construct a state graph from a Markov model of price action (like candlestick-pattern states), where edges are weighted by transition probabilities. When the market becomes highly directional, transitions may concentrate into a tighter subset of states; the graph effectively shrinks and the Wiener index can drop. In choppy or fragmented conditions, transitions may disperse across many states, increasing typical distances and thus raising
W(G). A strategy can use changes in a Wiener-like metric as a risk switch: trade aggressively when the system is “compact” (predictable transitions) and reduce exposure when it becomes “diffuse” (higher uncertainty).

The connection to hexagonal chains with segments of equal length comes from using well-studied graph families as interpretable templates. Hexagonal chains (common in chemical graph theory) have clear, tunable structure: straight segments and “kinks” change global distances, and therefore the Wiener index. In quantitative trading, a comparable idea is to model the “path” of market behavior as a chain of locally structured motifs (segments) of equal duration—e.g., repeating microstructure patterns, volatility regimes, or candlestick signatures. The way these segments connect (straight continuation vs turns/branch-like transitions) affects global reachability across the state space, analogous to how turning a hexagonal chain changes W(G). By calibrating a market-state graph to resemble different chain configurations, you can interpret W(G) as a structure score: lower Wiener index corresponds to smoother, more coherent regime progression; higher Wiener index suggests fragmented transitions and weaker predictability. This gives a graph-theoretic tool for feature engineering, regime detection, and systematic risk control.


Code
// Gri04.cpp - Zorro64 Strategy DLL (C++), Wiener index demo

#include <zorro.h>
#include <stdio.h>
#include <stdlib.h>

#define N   6
#define INF 1000000

struct Graph {
  int n;
  int* d; // flat n*n matrix
};

static int Graph_pos(const Graph* g, int r, int c) {
  return r*g->n + c;
}

static Graph* Graph_create(int n) {
  Graph* g = (Graph*)malloc(sizeof(Graph));
  if(!g) return 0;

  g->n = n;
  g->d = (int*)malloc(n*n*sizeof(int));
  if(!g->d) { free(g); return 0; }

  return g;
}

static void Graph_destroy(Graph* g) {
  if(!g) return;
  if(g->d) free(g->d);
  free(g);
}

static void Graph_reset(Graph* g) {
  for(int r=0; r<g->n; r++) {
    for(int c=0; c<g->n; c++) {
      g->d[Graph_pos(g,r,c)] = (r==c) ? 0 : INF;
    }
  }
}

static void Graph_link(Graph* g, int a, int b) {
  g->d[Graph_pos(g,a,b)] = 1;
  g->d[Graph_pos(g,b,a)] = 1;
}

static void Graph_buildBenzene(Graph* g) {
  Graph_reset(g);
  Graph_link(g,0,1);
  Graph_link(g,1,2);
  Graph_link(g,2,3);
  Graph_link(g,3,4);
  Graph_link(g,4,5);
  Graph_link(g,5,0);
}

static void Graph_allPairsShortest(Graph* g) {
  for(int k=0; k<g->n; k++) {
    for(int i=0; i<g->n; i++) {
      for(int j=0; j<g->n; j++) {
        int ij = Graph_pos(g,i,j);
        int ik = Graph_pos(g,i,k);
        int kj = Graph_pos(g,k,j);
        int cand = g->d[ik] + g->d[kj];
        if(cand < g->d[ij]) g->d[ij] = cand;
      }
    }
  }
}

static double Graph_wiener(const Graph* g) {
  double W = 0.0;
  for(int i=0; i<g->n; i++)
    for(int j=i+1; j<g->n; j++)
      W += (double)g->d[Graph_pos(g,i,j)];
  return W;
}

static void Graph_dump(const Graph* g) {
  printf("\nDistance matrix:");
  for(int r=0; r<g->n; r++) {
    printf("\n");
    for(int c=0; c<g->n; c++)
      printf("%2d ", g->d[Graph_pos(g,r,c)]);
  }
}

static int doMain()
{
  Graph* G = Graph_create(N);
  if(!G) {
    printf("\nOOM creating Graph");
    return 1;
  }

  Graph_buildBenzene(G);
  Graph_allPairsShortest(G);

  double W = Graph_wiener(G);

  Graph_dump(G);
  printf("\n\nWiener index (benzene C6) = %.0f\n", W);

  Graph_destroy(G);
  return 0;
}

// Zorro entry point for DLL strategies
DLLFUNC void run()
{
  // Only run once at start
  if(is(INITRUN)) {
    doMain();
    quit("Done.");
  }
}
140 60,611 Read More
A8 Engine
14 hours ago
Hello,

Thanks for the feedback.

NeoDumont: I've since solved the problem with the transparent door by editing the door's skin accordingly in Photoshop.

Regarding your question:

I'm using the standard "t-doors" code from the A8 include.

Regards

clonman
8 1,390 Read More
Zorro and the Brokers
Yesterday at 23:12
great many thanks!
16 4,186 Read More
Zorro and the Brokers
Yesterday at 18:55
16 4,186 Read More
Zorro Future
Yesterday at 13:22
Upgrading the Forum, will also improve your SEO... as there are new plugins that can change the level of exposure you have the the web.
In addition, we all are bound by previous limitations, we find it sometimes hard to adapt. mostly because we think changes are not possible to be easy.
9 1,114 Read More
Zorro Future
Yesterday at 05:30
Thanks jcl
9 1,114 Read More
Jobs Wanted
02/19/26 16:26
102 55,180 Read More
Jobs Wanted
02/19/26 13:22
Looking for new projects to score!
102 62,905 Read More
A8 Engine
02/19/26 13:13
can you show door action code?
8 1,390 Read More
Zorro and the Brokers
02/18/26 20:51
Hi, are there any furthe news on this, or suggested workarounds?
I am facing the same issue with the IB Gateway and Zorro. I am using IBC to keep the Gateway logged in after the daily restart, but once the Gateway has been restarted once, Zorro seems to lose the connectivity to it, even if the Gateway is back on line.

Thanks
16 4,186 Read More
Starting with Zorro
02/18/26 13:14
Originally Posted by jcl
The p value is normally calculated for the final portfolio. If you want individual p-values, select a job and run the MA only for that job.

I simply want to know which jobs ended up in the final portfolio. I couldn’t find any file that explicitly lists the final selected jobs, so I’m trying to figure it out based on the p-values.
2 85 Read More
Starting with Zorro
02/18/26 08:14
The p value is normally calculated for the final portfolio. If you want individual p-values, select a job and run the MA only for that job.
2 85 Read More
Starting with Zorro
02/18/26 07:56
I am testing the evaluation shell. After running the Monte Carlo Analysis, how can I know which jobs passed the verification (i.e., have a p-value less than 5%)? Is there a file that stores the p-values for different jobs? I know the Zorro message window shows the p-value, but I'm not sure which job it corresponds to, so I'm wondering if there's a CSV file that stores the p-values for the jobs.
2 85 Read More
A8 Engine
02/17/26 15:40
clonman, I'm sorry I can't help you in this case. Please find out yourself.

Best wishes !

NeoDumont
8 1,390 Read More
Starting with Zorro
02/17/26 13:24
At a quick glance, Grok is right. The profits of overlapping trades are accordingly split between the segments.
2 116 Read More
Starting with Zorro
02/17/26 06:01
I ask grok ai regarding the above problem, it gives the follwing answer, is it correct?

In Zorro's [Test] mode (after WFO training is completed), the Net Profit statistics in the WFO Cycles section (Best / Worst / Avg / StdDev) are calculated based on each Out-of-Sample (OOS) test period (i.e., each WFO cycle’s test segment) being treated as an independent slice for performance evaluation. Regarding how floating profit/loss (unrealized P/L) from open trades is handled:
1. Does the Net Profit of the first test period include the floating profit of open trades?
Yes, it does include — but only the floating profit/loss of positions that are still open at the end of that period (unrealized P/L).

When Zorro computes the Net Profit for each OOS test cycle, it includes the current unrealized profit/loss of all open positions as of the end of that cycle.
This means: if there are any open trades at the end of the first OOS test period, their floating profit/loss (from entry price to the closing price of that cycle) will be added to this cycle’s Net Profit (even if those trades are only closed in later cycles).
Reason: Each OOS segment is treated as a “standalone statistical unit”. Therefore, the account equity at the end of the segment (including the current value of open trades) is used to calculate the “realized + unrealized” net profit for that segment.

2. If a trade carries over from the first test period to the second test period, in which period is its profit ultimately counted?
The profit is split across periods (part in the period where it was held, part in the period where it was closed).

From entry until the end of the first period: The unrealized P/L of this trade (price change from entry to the end price of the first cycle) is included in the first cycle’s Net Profit (as part of the unrealized portion).
From the start of the second period until exit: The price change during the second period (from the start price of the second cycle to the exit price) is counted in the second cycle’s Net Profit (as realized profit/loss when the trade is closed).
Summary: For a transitional trade that spans multiple cycles, its total realized profit will be split and attributed to different cycles’ Net Profit:
Previous cycle(s): only the unrealized portion up to the end of each cycle.
Final cycle (where it closes): the realized portion from the start of that cycle to exit.


This split means that Best / Worst / Avg / StdDev calculations can be influenced by transitional open positions, but each cycle’s Net Profit still reflects the “equity change during that window” (including the current value of open trades at the end).
Why is it handled this way?

Zorro wants the WFO Cycles statistics to reflect “how the strategy would have performed if you only looked at this time window” (similar to rolling-window equity change).
If unrealized P/L at the end of a cycle were not included, the statistics for many segments would be severely distorted — especially for strategies with longer holding periods (swing or position trading).
However, this approach also introduces “boundary effects”: the same trade’s P/L being split across cycles can make Avg / StdDev appear more volatile (particularly when StdDev is already high).
2 116 Read More
Starting with Zorro
02/17/26 05:04
After WFO training, when clicking Test to execute the test, my question is: Will the system concatenate the test sets of each WFO cycle into one large test set for backtesting? In this case, open trades at the end of the first test set would carry over to the second test set. Or will each test set be backtested separately, starting from an initial state with no trades for each test set.
2 116 Read More
Automated Trading
02/16/26 16:09
Hi, I am using Hedge = 5 with FXCM. This is my standard set-up. It works as expected.

M.
1 148 Read More
A8 Engine
02/16/26 11:44
Hello NeodDumont,

Sorry for the late reply, but the flu really got me.
Regarding the issue:
Yes, indeed, if the "create meshes" checkbox isn't selected during compilation, the camera rises.

And as you already mentioned, the downside is that the animated textures don't work. To still be able to use animated textures, I simply convert the textures into sprites, and that works quite well.

But now I have another problem:
How do you create a model door (MDL) with transparent panes, assign an action to it, and have that action executed?

Creating a transparent door as a prefab isn't a problem. Create the door and insert the panes as a model (MDL) with "Albedo/Fog = 80,000", and the transparent part is ready.

Okay, I can export the door in MED as a model (MDL), re-import it, and insert the panel models, but then I have the following problem: When I assign an action to the door, nothing happens. If I remove the two model panels (MDL), the action is executed. Is this also a bug, or am I missing something?

Thanks for your help.

Regards
clonman
8 1,390 Read More

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1