1 registered members (TipmyPip),
17,605
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
ZorroGPT
#487923
11/19/23 11:26
11/19/23 11:26
|
Joined: Sep 2017
Posts: 164
TipmyPip
OP
Member
|
OP
Member
Joined: Sep 2017
Posts: 164
|
Something Big is coming... Complete Automation development within VSC for Zorro using Agents with wide platform asynchronous development using AI/ML to directly interact with compiler. https://bit.ly/3Gbsm4SMay all traders enjoy. Initialize parameters and constants
Initialize data buffers for multiple timeframes
Initialize historical performance record
For each new bar:
For each timeframe in {Fast, Medium, Slow}:
Update price buffer
Compute AbstractMetric_A[timeframe] // e.g., some transformation of price history
Compute AbstractFeatureSet1 from AbstractMetric_A and other transformations
RawSignal ? AbstractDecisionFunction1(AbstractFeatureSet1)
ModelInput1 ? AbstractFeatureSet1
[ProbLong, ProbShort] ? Model1(ModelInput1)
AdjustedSignal ? AbstractSignalFilter(RawSignal, ProbLong, ProbShort)
Update performance history from closed trades
Compute AbstractFeatureSet2 from AbstractMetric_A and performance statistics
ModelInput2 ? AbstractFeatureSet2
[StopMultiplier, TakeProfitMultiplier] ? Model2(ModelInput2)
Constrain StopMultiplier, TakeProfitMultiplier to allowable ranges
StopDistance ? AbstractVolatilityMeasure * StopMultiplier
TakeProfitDistance ? AbstractVolatilityMeasure * TakeProfitMultiplier
If in training mode:
Execute trades based on RawSignal
Else:
Execute trades based on AdjustedSignal
Plot monitoring metrics (non-trading)
Last edited by TipmyPip; 08/24/25 18:21.
|
|
|
Re: Zorro Trader GPT
[Re: TipmyPip]
#487927
11/22/23 05:08
11/22/23 05:08
|
Joined: Sep 2017
Posts: 164
TipmyPip
OP
Member
|
OP
Member
Joined: Sep 2017
Posts: 164
|
Here is one Idea : I Wish Zorro Trader (lite-C) could manage better dynamic memory. Trying to code the below program in dynamic memory, doesn't work out properly. (Error 111 in main()) #include <stdio.h>
#define INT_BITS 32
#define MAX_NODES 1024
// Trie node structure
typedef struct TrieNode {
struct TrieNode* bit[2];
} TrieNode;
TrieNode trieNodes[MAX_NODES];
int trieNodeCount = 0;
TrieNode* newTrieNode() {
if (trieNodeCount >= MAX_NODES) {
printf("Exceeded maximum trie nodes\n");
return NULL;
}
TrieNode* newNode = &trieNodes[trieNodeCount++];
newNode->bit[0] = NULL;
newNode->bit[1] = NULL;
return newNode;
}
void insert(TrieNode* root, int number) {
TrieNode* current = root;
int i, bit;
for (i = INT_BITS - 1; i >= 0; i--) {
bit = (number >> i) & 1;
if (!current->bit[bit]) {
current->bit[bit] = newTrieNode();
if (!current->bit[bit]) return;
}
current = current->bit[bit];
}
}
int findMaxXOR(TrieNode* root, int number) {
TrieNode* current = root;
int maxXOR = 0;
int i, bit;
for (i = INT_BITS - 1; i >= 0; i--) {
bit = (number >> i) & 1;
if (current->bit[1 - bit]) {
maxXOR |= (1 << i);
current = current->bit[1 - bit];
} else {
current = current->bit[bit];
}
}
return maxXOR;
}
int getMaxXOR(int* arr, int size) {
TrieNode* root = newTrieNode();
if (!root) return 0;
int maxXOR = 0;
int i, currentXOR;
for (i = 0; i < size; i++) {
insert(root, arr[i]);
currentXOR = findMaxXOR(root, arr[i]);
if (currentXOR > maxXOR) {
maxXOR = currentXOR;
}
}
return maxXOR;
}
void main() {
int arr[10] = {3, 10, 5, 25, 2, 8};
int size = 6;
int result = getMaxXOR(arr, size);
printf("Maximum XOR: %d\n", result);
}
And another version : #define INT_BITS 32
#define MAX_NODES 1024
#define MAX_ARRAY_SIZE 10
#define RAND_MAX_VALUE 100 // maximum random number value
// Trie node structure
typedef struct TrieNode {
struct TrieNode* bit[2];
} TrieNode;
TrieNode trieNodes[MAX_NODES];
int trieNodeCount = 0;
// === Clear trie memory safely ===
void clearTrie()
{
int i;
for(i = 0; i < MAX_NODES; i++) {
trieNodes[i].bit[0] = NULL;
trieNodes[i].bit[1] = NULL;
}
trieNodeCount = 0;
}
// === Allocate new node ===
TrieNode* newTrieNode() {
if (trieNodeCount >= MAX_NODES) {
printf("\nExceeded maximum trie nodes\n");
return NULL;
}
TrieNode* newNode = &trieNodes[trieNodeCount++];
newNode->bit[0] = NULL;
newNode->bit[1] = NULL;
return newNode;
}
// === Insert number into trie ===
void insert(TrieNode* root, int number) {
TrieNode* current = root;
int i, bit;
for (i = INT_BITS - 1; i >= 0; i--) {
bit = (number >> i) & 1;
if (!current->bit[bit]) {
current->bit[bit] = newTrieNode();
if (!current->bit[bit]) return;
}
current = current->bit[bit];
}
}
// === Find max XOR for given number ===
int findMaxXOR(TrieNode* root, int number) {
TrieNode* current = root;
int maxXOR = 0;
int i, bit;
for (i = INT_BITS - 1; i >= 0; i--) {
bit = (number >> i) & 1;
if (current->bit[1 - bit]) {
maxXOR |= (1 << i);
current = current->bit[1 - bit];
} else {
current = current->bit[bit];
}
}
return maxXOR;
}
// === Compute max XOR from array & track best pair ===
int getMaxXOR(int* arr, int size, int* num1, int* num2) {
clearTrie(); // ensure trie is empty before use
TrieNode* root = newTrieNode();
if (!root) return 0;
int maxXOR = 0;
int i, currentXOR;
*num1 = 0;
*num2 = 0;
for (i = 0; i < size; i++) {
insert(root, arr[i]);
currentXOR = findMaxXOR(root, arr[i]);
if (currentXOR > maxXOR) {
maxXOR = currentXOR;
*num1 = arr[i];
*num2 = arr[i] ^ maxXOR; // second number from XOR relation
}
}
return maxXOR;
}
// === Zorro entry point ===
function run() {
int size = MAX_ARRAY_SIZE;
int arr[MAX_ARRAY_SIZE];
int i;
// Generate random integers
printf("\nGenerated numbers: ");
for (i = 0; i < size; i++) {
arr[i] = random(RAND_MAX_VALUE);
printf("%d ", arr[i]);
}
printf("\n");
int n1, n2;
int result = getMaxXOR(arr, size, &n1, &n2);
printf("Maximum XOR: %d (from %d ^ %d)\n", result, n1, n2);
}
Last edited by TipmyPip; 08/10/25 11:25.
|
|
|
Re: Zorro Trader GPT
[Re: TipmyPip]
#487930
11/22/23 15:24
11/22/23 15:24
|
Joined: Feb 2017
Posts: 1,806 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,806
Chicago
|
But it is going beyond the scope of the platform and requires external resources, that depend on other languages. Zorro supports C++ out-of-the-box directly by invoking the VS compiler. It really is superior to Lite-C in every way.
|
|
|
Re: Zorro Trader GPT
[Re: TipmyPip]
#487959
12/02/23 02:15
12/02/23 02:15
|
Joined: Mar 2021
Posts: 35 Ocean county, Florida
NewtraderX
Newbie
|
Newbie
Joined: Mar 2021
Posts: 35
Ocean county, Florida
|
Hi, Friends, We are happy to announce the First version of ZorroTrader GPT. https://bit.ly/3Gbsm4SMay all traders enjoy. Hello TipmyPip, I will try to utilize the ZorroTrader GPT, bard ai by Google is also pretty good. What do you think about it? since its free, can we use bard to spit out lite c code?
|
|
|
|