|
Zorro Trader GPT
#487923
11/19/23 11:26
11/19/23 11:26
|
Joined: Sep 2017
Posts: 93
TipmyPip
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2017
Posts: 93
|
Hi, Friends, We are happy to announce the First version of ZorroTrader GPT. https://bit.ly/3Gbsm4SMay all traders enjoy.
Last edited by TipmyPip; 11/24/23 04:53.
|
|
|
Re: Zorro Trader GPT
[Re: TipmyPip]
#487927
11/22/23 05:08
11/22/23 05:08
|
Joined: Sep 2017
Posts: 93
TipmyPip
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2017
Posts: 93
|
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);
}
Last edited by TipmyPip; 11/27/23 00:33.
|
|
|
Re: Zorro Trader GPT
[Re: TipmyPip]
#487930
11/22/23 15:24
11/22/23 15:24
|
Joined: Feb 2017
Posts: 1,738 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,738
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?
|
|
|
|