Tag Archives: merge

Jython tutorial to merge Python and Java

Jython tutorial to merge Python and Java

One Dukascopy JForex got me interested.

https://github.com/redrhino/jforex-python/blob/master/strategy/Strategy.py

( I am sure this works but I gave up on it as I don’t really need it as compared to using Redis NoSQL )

It is built off of Jython where you merge Python running Java and vice versa. Here are some tuturials to help you out:

https://wiki.python.org/jython/LearningJython

https://wiki.python.org/jython/InstallationInstructions

Join my FREE newsletter to learn more about this technology to help in your automated trading

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

I got my Java class, I got my Matlab HFT system with potential listener and callback, let’s merge them

I got my Java class, I got my Matlab HFT system with potential listener and callback, let’s merge them

So close…I can taste it now. I just want to demo it once complete!!

Find out what I plan to do with this by joining my FREE newsletter 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

C++ interview question: How to merge one array into another also known as merge sort

C++ interview question: How to merge one array into another also known as merge sort

How to merge one array into another. A good example would involve a merge sort like:
void MergeSort(apvector &arrayA, apvector &arrayB, apvector &arrayC)
{
int indexA = 0; // initialize variables for the subscripts
int indexB = 0;
int indexC = 0;

while((indexA < arrayA.length( )) && (indexB < arrayB.length( )) { if (arrayA[indexA] < arrayB[indexB]) { arrayC[indexC] = arrayA[indexA]; indexA++; //increase the subscript } else { arrayC[indexC] = arrayB[indexB]; indexB++; //increase the subscript } indexC++; //move to the next position in the new array } // Move remaining elements to end of new array when one merging array is empty while (indexA < arrayA.length( )) { arrayC[indexC] = arrayA[indexA]; indexA++; indexC++; } while (indexB < arrayB.length( )) { arrayC[indexC] = arrayB[indexB]; indexB++; indexC++; } return; } The one powerful concept of arrays is their use to traverse the array as you can access each element using the same expression. All you need to is have an interated statement in which the variable i can be used as a counter incrementing from zero to the length minus one.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!