Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/20/26 15:57
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Quad, 1 invisible), 3,371 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
juergenwue, VladMak, Geir, ondrej, mredit
19208 Registered Users
Active Threads | Active Posts | Unanswered Today | Since Yesterday | This Week
The Z Systems
Yesterday at 15:57
I have Zorro S, after upgrading to Zorro 3.01.6 trying to run Trade on Z9, worked before every time, I am getting the Error 058, see attachment.

Also here is what I have in history.csv:

Uzyskaj apikey:

1. Otwórz stron? https://stooq.pl/q/d/?s=XLV.US&get_apikey
2. Wpisz kod captcha.
3. Skopiuj link pobrania pliku CSV znajduj?cy si? w dole strony - b?dzie zawiera? zmienn? <apikey>.
4. Do swoich zapyta? dopisz zmienn? <apikey> z jej warto?ci?, np.
https://stooq.pl/q/d/l/?s=XLV.US&am...;apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Looks like the apikey used is invalid. Please advice on how to fix.

Thanks
0 8 Read More
Jobs Wanted
04/14/26 19:19
110 59,607 Read More
Zorro and the Brokers
04/13/26 09:42
Stooq has changed their policy and now requires an API key for downloading data. The procedure:

1. Open https://stooq.com/q/d/?s=aapl.us&get_apikey
2. Enter the captcha code.
3. Copy the CSV download link at the bottom of the page - it will contain the apikey variable.
4. Append the apikey variable with its value to all requests, e.g.
https://stooq.com/q/d/l/?s=msft.us&i=d&apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The next Zorro beta will contain an entry in Zorro.ini for the Stooq API key.
0 335 Read More
Zorro and the Brokers
04/13/26 09:34
You can stop trading at a particular time, but not restart it since when Zorro is stopped, no script is running. But you can stop and start a trading Zorro process at a particular time. The procedure is described under https://zorro-project.com/manual/en/engine.htm.
32 6,193 Read More
User Resources
04/10/26 18:58
Hi Folks !

Just want to show you a pic of a skull which was created by my small tool >knubber<.
You can also download the .mdl from here.

Knubber is a program which creates objects from Rnd functions automatically. It is part of my >blobsculptor tools< release you can also find on the "Third party tools" section on this forum.

[Linked Image]

Download the MED Model here:

The blobmaul.mdl has 3282 vertices and 6562 faces.

Best wishes !

NeoDumont
0 99 Read More
Starting with Zorro
04/08/26 21:47
figured it out...I was calling the asset function before having defined the BarPeriod and Lookback periods.
Would be great if Zorro compiler checked those declaration rules and told the uses about such inconsistencies....!


Thanks
1 116 Read More
User Resources
04/08/26 19:55
Hi, Folks !

The texrure download is now not available anymore as I mentioned above.

Best wishes for all of you !

NeodDumont
1 332 Read More
Starting with Zorro
04/08/26 17:08

Code
  LearningSnapshot buildSnapshot() {
    LearningSnapshot s;
    s.meanScore = 0;
    s.meanCompactness = 0;
    s.meanVol = 0;
    for(int i=0;i<N_ASSETS;i++) {
      s.meanScore += (double)scores[i];
      s.meanCompactness += (double)compactness[i];
      s.meanVol += (double)featSoA.get(2, i, 0);
    }
    s.meanScore /= (double)N_ASSETS;
    s.meanCompactness /= (double)N_ASSETS;
    s.meanVol /= (double)N_ASSETS;

    double sumAbs = 0;
    double sumSq = 0;
    int nCorr = 0;
    for(int i=0;i<N_ASSETS;i++) {
      for(int j=i+1;j<N_ASSETS;j++) {
        double c = fabs((double)corrMatrix[i*N_ASSETS + j]);
        sumAbs += c;
        sumSq += c * c;
        nCorr++;
      }
    }
    if(nCorr > 0) {
      s.meanAbsCorr = sumAbs / (double)nCorr;
      double m2 = sumSq / (double)nCorr - s.meanAbsCorr * s.meanAbsCorr;
      if(m2 < 0) m2 = 0;
      s.stdAbsCorr = sqrt(m2);
    } else {
      s.meanAbsCorr = 0;
      s.stdAbsCorr = 0;
    }

    s.momentumMean = 0;
    for(int i=0;i<N_ASSETS;i++) s.momentumMean += (double)featSoA.get(1, i, 0);
    s.momentumMean /= (double)N_ASSETS;

    s.regime = 0;
    s.regimeConfidence = 0;
    return s;
  }

  void onBar() {
    barCount++;

    for(int i=0;i<N_ASSETS;i++) computeFeatures(i);

    if(barCount % UPDATE_EVERY == 0) {
      updateCount++;

      computeCorrelationMatrix();
      computeDistanceMatrix();
#if USE_COMMUNITY
      hclust.update(distMatrix.data);
#endif
#if USE_COMMUNITY
      comm.update(corrMatrix.data, distMatrix.data);
#endif
      floydWarshall();
      computeScores();
      LearningSnapshot snap = buildSnapshot();
      controller.onUpdate(snap, scores.data, N_ASSETS, updateCount);
#if USE_DENSITY
      double dz[DENSITY_DIM];
      densityState.build(snap, updateCount, openCL.ready, controller.scoreScale, controller.dynamicTopK, dz);
      densityModel.observe(dz, updateCount, &densityLabel, &densityConf, &densityNoise);
      densityRegimeCtrl.apply(densityNoise, densityLabel, densityConf, STRATEGY_PROFILE, &controller.dynamicTopK, &controller.scoreScale, &controller.riskScale);
      for(int i=0;i<N_ASSETS;i++) {
        double s = (double)scores[i] * densityRegimeCtrl.appliedRiskScale;
        if(s > 1.0) s = 1.0;
        if(s < 0.0) s = 0.0;
        scores[i] = (fvar)s;
      }
#endif
#if USE_AE
      double aeState[AE_INPUT_DIM];
      double ms=0, mc=0, mv=0;
      for(int i=0;i<N_ASSETS;i++){ ms += (double)scores[i]; mc += (double)compactness[i]; mv += (double)featSoA.get(2, i, 0); }
      ms /= (double)N_ASSETS; mc /= (double)N_ASSETS; mv /= (double)N_ASSETS;
      aeState[0] = ms;
      aeState[1] = mc;
      aeState[2] = mv;
      aeState[3] = controller.scoreScale;
      aeState[4] = (double)controller.dynamicTopK;
      aeState[5] = (double)barCount / (double)(LookBack + 1);
      aeState[6] = (double)updateCount / 1000.0;
      aeState[7] = (double)openCL.ready;
      double reconErr = ae.infer(aeState);
      novelty.update(reconErr);
      novelty.apply(&controller.dynamicTopK, &controller.scoreScale);
      for(int i=0;i<N_ASSETS;i++){{
        double s = (double)scores[i] * novelty.riskScale;
        if(s > 1.0) s = 1.0;
        if(s < 0.0) s = 0.0;
        scores[i] = (fvar)s;
      }}
#endif
      printTopK();
    }
  }

  void printTopK() {
    int indices[N_ASSETS];
    for(int i=0;i<N_ASSETS;i++) indices[i] = i;

    int topN = controller.dynamicTopK;
#if USE_COMMUNITY
    if(comm.qSmooth < (fvar)COMM_Q_LOW && topN > 2) topN--;
    if(comm.qSmooth > (fvar)COMM_Q_HIGH && topN < TOP_K) topN++;
#endif
    for(int i=0;i<topN;i++){
      for(int j=i+1;j<N_ASSETS;j++){
        if(scores[indices[j]] > scores[indices[i]]) {
          int tmp = indices[i];
          indices[i] = indices[j];
          indices[j] = tmp;
        }
      }
    }

    if(updateCount % 10 == 0) {
      printf("===CompactDominant_v14 Top-K(update#%d,OpenCL=%d)===\n",
        updateCount, openCL.ready);
#if USE_COMMUNITY
      printf(" communities=%d Q=%.4f\n", comm.nCommunities, (double)comm.qSmooth);
#endif
#if USE_DENSITY
      printf(" density(label=%d,noise=%d,conf=%.3f,pause=%d)\n", densityLabel, densityNoise, densityConf, densityRegimeCtrl.paused);
#endif

      int selected[N_ASSETS];
      int selCount = 0;
#if USE_COMMUNITY
      int coarseUsed[HCLUST_COARSE_K];
      int fineTake[HCLUST_FINE_K];
      int fineCap = (topN + HCLUST_FINE_K - 1) / HCLUST_FINE_K;
      for(int c=0;c<HCLUST_COARSE_K;c++) coarseUsed[c] = 0;
      for(int c=0;c<HCLUST_FINE_K;c++) fineTake[c] = 0;

      for(int i=0;i<topN;i++){
        int idx = indices[i];
        int cid = comm.clusterCoarse[idx];
        if(cid < 0 || cid >= HCLUST_COARSE_K) cid = 0;
        if(coarseUsed[cid]) continue;
        coarseUsed[cid] = 1;
        selected[selCount++] = idx;
        int fid = comm.clusterFine[idx];
        if(fid < 0 || fid >= HCLUST_FINE_K) fid = 0;
        fineTake[fid]++;
      }

      for(int i=0;i<topN && selCount<topN;i++){
        int idx = indices[i];
        int dup = 0;
        for(int k=0;k<selCount;k++) if(selected[k]==idx){ dup=1; break; }
        if(dup) continue;
        int fid = comm.clusterFine[idx];
        if(fid < 0 || fid >= HCLUST_FINE_K) fid = 0;
        if(fineTake[fid] >= fineCap) continue;
        selected[selCount++] = idx;
        fineTake[fid]++;
      }
#else
      for(int i=0;i<topN;i++) selected[selCount++] = indices[i];
#endif
      for(int i=0;i<selCount;i++){
        int idx = selected[i];
        printf(" %d.%s: score=%.4f, C=%.4f\n", i+1, ASSET_NAMES[idx], (double)scores[idx], (double)compactness[idx]);
      }
    }
  }
};

// ---------------------------- Zorro DLL entry ----------------------------

static CompactDominantStrategy* S = NULL;

DLLFUNC void run()
{
  if(is(INITRUN)) {
    BarPeriod = 60;
    LookBack = max(LookBack, FEAT_WINDOW + 50);

    asset((char*)ASSET_NAMES[0]);

    if(!S) {
      S = new CompactDominantStrategy();
      S->init();
    }
  }

  if(is(EXITRUN)) {
    if(S) {
      S->shutdown();
      delete S;
      S = NULL;
    }
    return;
  }

  if(!S || Bar < LookBack)
    return;

  S->onBar();
}
221 72,083 Read More
The Z Systems
04/08/26 12:40
Great, thanks!
Glad you found the problem.
10 452 Read More
Zorro and the Brokers
03/26/26 19:52
Same as for any other asset. If the broker has only daily prices, you get only daily prices. If they have tick prices, you get tick prices.
1 173 Read More
Zorro and the Brokers
03/24/26 17:11
Use IB.
1 165 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