I've noticed there is a thread for Anvil and a thread for sterling, so I wanted to create one for Genesis. Code: int CMyStock::OnGotQuoteLevel1(GTLevel1 *pRcd) { LOG(" THE BID %d %d %d \n", pRcd->dblBidPrice, pRcd->locAskPrice, pRcd->locAskSize); } Output >>> THE BID 858993459 1079313203 1717986919 THE BID 858993459 1079313203 -1546188226 THE BID 858993459 1079313203 1717986919 I was wondering if anyone knows what these numbers mean? how does a number like 858993459 represent the bid? I'm sure you have to translate this number, but I'm not sure how. Thanks
My other ? is about running multiple strategies with Laser. Say you have created 4 strategies and created 4 .exe files. Would you be able to run each of these at the same time or does Laser only allow you one connection where you'll have to combine all stratgies into one project? How exacty does this work? Thanks
Looks like you printf mask is wrong. Assuming the first two are doubles and the last one an int your mask should be " %f %f %d"
ty for for that CT, that was what was wrong. Do you know the answer to the 2nd question about how you run mult strategies in Laser?
Blue, I never worked with Genensis API. In general, running multiple strategies in the same account will only work if each strategy is limted to certain portfolio of stocks. If a stock symbol is use by more that one strategy then it can get messy. for example, if one strategy #1 enters a positon, strategy #2 my close it based on its extit strategy. You could maintain a "ownership" model where on it the strategy that entered the position is the only one that can close AND no other strategy can enter a postion on a stock that is already positioned. If you want to run the same portfolio, then you may need 4 different accounts and 4 separate exes running. I hope this helps ... ctarmor
How do you cancel orders? Code: MyBuy { GTOrder m_BuyOrder1 = m_defOrder; GTOrder m_BuyOrder2 = m_defOrder; .... PlaceOrder( m_BuyOrder1 ); PlaceOrder( m_BuyOrder2 ); if (condition1) { CancelOrder(m_BuyOrder1); } if (condition2) { CancelOrder(m_BuyOrder2); } } if you run this you'll get an error cause CancelOrder() is looking for type GTPending So when you send the orders in you'll get this callback function to run int CMyStock::OnExecMsgPending(const GTPending &pRcd) { } So what I was thinking of is to create 2 more variables GTPending m_BuyOrder1_Pending; GTPending m_BuyOrder2_Pending; then i want to do something like this int CMyStock::OnExecMsgPending(const GTPending &pRcd) { if (pRcd ==[is pending from] m_BuyOrder1) m_BuyOrder1_Pending = pRcd; else if (pRcd ==[is pendingn from] m_BuyOrder2) m_BuyOrder2_Pending = pRcd; } therefore, when I do cancel the orders I know that m_BuyOrder1_Pending is associated with m_BuyOrder1. However this code does not work. Basically I wanna know how to link the GTOrder to GTPending so I can cancel the GTOrder I hope that makes sense
Can't me make multiple threads running different strategies? Let them talk to each other so you're not getting your buy/exit signals mixed up.