Linkers::X->theNextBigThing; in C++ HFT Event Driven Algorithmic Trading

Is There Another Way To Daytrade Besides Forex? 0 replies
Don't daytrade the London/NY session? 15 replies
Why even daytrade? 21 replies
daytrade emini S&P Leverage question 2 replies
Daytrade EA 1 reply
Disliked{quote} I like your challenge.But unfortunately there is no easy and simple solution for this specific type of problem.
Do you know any other ways to recreate this without classes and oop? Or in other words - can you solve your own challenge?
Ignored
// simple Event Driven architecture, so any Average Joe Trader can understand... xOrder long1; xOrder short1; if(e.broken_swing_low) { short1.sell(); } // second one to learn for Trader Joe if(e.higher_swing_high) { long1.buy(); } // #3 previous daily high touched if(e.daily_high) { short1.sell(); }
class TIME { protected: MqlDateTime now_time; void init_time(){ TimeToStruct(TimeCurrent(),now_time); } public: TIME(){ init_time(); } int get_hour(){ return now_time.hour; } int get_min(){ return now_time.min; } int get_sec(){ return now_time.sec; } int current_hour_is_between(int begin_hour,int end_hour){ return (now_time.hour>=begin_hour && now_time.hour<=end_hour); } int get_day_of_year(){ return now_time.day_of_year; } void update(){ TimeToStruct(TimeCurrent(),now_time); } };
Time myTime();
myTime.update();
Disliked{quote} // simple Event Driven architecture, so any Average Joe Trader can understand... xOrder long1; xOrder short1; if(e.broken_swing_low) { short1.sell(); } // second one to learn for Trader Joe if(e.higher_swing_high) { long1.buy(); } // #3 previous daily high touched if(e.daily_high) { short1.sell(); }Ignored
double AMA_zero = mikeAMA.update(); mikeMa.update(); if( mikeMa.crossedUpAMA() ){ if(!myPositions.there_are_short_positions()){ lots = myMoney.calculateLots(22); SendSellOrder(4000,0,lots*2,AMA_zero-0.0065,0); } }else if(mikeMa.crossedDownAMA() ) { if(!myPositions.there_are_long_positions()){ lots = myMoney.calculateLots(22); SendBuyOrder(3000,0,lots*2,AMA_zero+0.0065,0); } }
Disliked{quote} // simple Event Driven architecture, so any Average Joe Trader can understand... xOrder long1; xOrder short1; if(e.broken_swing_low) { short1.sell(); } // second one to learn for Trader Joe if(e.higher_swing_high) { long1.buy(); } // #3 previous daily high touched if(e.daily_high) { short1.sell(); }Ignored
Disliked{quote} I've also written this in MQL4. I think this is similar to what you show here, right?: double AMA_zero = mikeAMA.update(); mikeMa.update(); if( mikeMa.crossedUpAMA() ){ if(!myPositions.there_are_short_positions()){ lots = myMoney.calculateLots(22); SendSellOrder(4000,0,lots*2,AMA_zero-0.0065,0); } }else if(mikeMa.crossedDownAMA() ) { if(!myPositions.there_are_long_positions()){ lots = myMoney.calculateLots(22); SendBuyOrder(3000,0,lots*2,AMA_zero+0.0065,0); } } I "encapsulate" positions in myPositions, orders in myOrders (not seen - items...Ignored
Disliked{quote} Ah, I see. The "evented" stuff appears to be the difference. Right? =D Couldn't you use something like this to accomplish that if you desired? http://www.nj4x.com/ You would need to figure out how to use it with the C++. I'm not sure since I've only seen it with C#.Ignored
Disliked{quote} X->youGottaBeKiddingMe; Java and .Net interfaces to supported Forex brokers in a legal and robust way. C# and Java, LOLIgnored
Disliked{quote} I don't even use std:: containers in C++ because of speed, but have custom xVector class and other containers... #C? haha NinjaTraders Everlasting Market Replay and overall speed ;-))))))))Ignored
// MQL4 code double high1; ulong timerStart = xTimeNowMS(); // time Now in microseconds since epoch for(int i=0; i<10000000; i++) { high1 = High[0]; } ulong timerEnd = xTimeNowMS(); print(timerEnd-timerStart); // this loop will give us very speedy results //around 70000 microseconds for 10 Million loop
Disliked{quote} I like your challenge.But unfortunately there is no easy and simple solution for this specific type of problem.
Do you know any other ways to recreate this without classes and oop? Or in other words - can you solve your own challenge?
Ignored
DislikedCan't you write OO style in current MT4? Here is an example of some of my current code: class TIME { protected: MqlDateTime now_time; void init_time(){ TimeToStruct(TimeCurrent(),now_time); } public: TIME(){ init_time(); } int get_hour(){ return now_time.hour; } int get_min(){ return now_time.min; } int get_sec(){ return now_time.sec; } int current_hour_is_between(int begin_hour,int end_hour){ return (now_time.hour>=begin_hour && now_time.hour<=end_hour); } int get_day_of_year(){ return now_time.day_of_year; } void update(){ TimeToStruct(TimeCurrent(),now_time);...Ignored
// time1 will be current time now in microseconds since epoch xTime time1(xTimeNowMS()); time1.add(xTimeNowMS); // add another time now in micros print (time1.year(0)); //print first element print (time1.month(1)); //print second element
Disliked{quote} Why bother? // time1 will be current time now in microseconds since epoch xTime time1(xTimeNowMS()); time1.add(xTimeNowMS); // add another time now in micros print (time1.year(0)); //print first element print (time1.year(1)); //print second elementIgnored
// time1 will be current time now in microseconds since epoch xTime time1(xTimeNowMS()); xSleepMS(50000); // wait 50000 microseconds time1.add(xTimeNowMS()); // add another time now in micros print (time1.year(0)); //print first element print (time1.month(1)); //print second element print (time1.MS(1)); //print time1 @ pos 1 microsecond part // shift container to the left for 2 positions // container empty after the operation time1.shiftLeft(2); print(time1.overflow()); //print the last overflow after shifting 2 x left //send time1 container remotely to pops a with message attached time1.message("incoming time container pops", 192.168.1.43:27017);
DislikedI understand you are interesting in promote your framework but why you think coders will use it? Sometimes is better support one platform fully than try support a lot of platforms with a small usage percent in retail world...Ignored