MT3 API: What does ConSecurity indirect field do?Back to topics list |
|
Halcon
2005.07.18 17:43
In the MetaTraderAPIExample2 project, I see several instanced of the following:
SendOrderInfo soi;
soi.volume = m_nLots;
soi.cmd = cmd;
if(g_pSecs[m_iSec].indirect == FALSE)
soi.price = (cmd == OP_BUY ? m_fAsk : m_fBid);
else
soi.price = (cmd == OP_BUY ? m_fBid : m_fAsk);
|
|
Slawa
2005.07.18 17:50
just exotics. implemented for only one broker. exposed code is "self documented"
|
|
Halcon
2005.07.18 18:03
Slawa,
Wow, thanks for the quick response. Just to confirm: So this will never happen for currencies? Are the exotics like the CFDs and stock trades available on Alpari? Is Alpari the broker that requested this? Another question from MetaTraderAPIExample2: I saw this check in the OnInitDialog() call:
//---- symbols
for (int i = 0; i < g_nSecs; i++)
{
//---- unused[0] ñèãíàëèçèðóåò âûáðàí ëè symbol
if (g_pSecs[i].unused[0] == 1)
{
int idx = m_Symbols.AddString(g_pSecs[i].name);
m_Symbols.SetItemData(idx, i);
}
}
|
|
Slawa
2005.07.18 18:17
Alpari does not use indirect flag, it is false always.
unused[0] used for internal purposes. translation of comment is "unused[0] signals whether symbol is selected already" |
|
Halcon
2005.07.18 18:24
What exactly does: "unused[0] signals whether symbol is selected already" mean in this case? Obviously it has significance, as it is being used in the startup code. I am trying to understand the MT3 API as best I can so that I don't make any mistakes once I start implementing it on a real system. Certainly unused[0] has some important meaning! :) Also, I noticed that the number of lots used when sending in an order is always 100 times what we would consider a normal lot. That is, if I want a single lot on a normal trading acct, I would set the SendOrderInfo structure's volume field to 100. Is this correct? For a mini acct, a single lot would be a volume of 10. Yes? Thanks again... I promise to try not to bother so much. But, your API looks very promising to me. - HP |
