Just tell us the error description and we'll try to help you ...
if (/*OrdersTotal()== 0 &&*/ ask <= openprice)
{
int success = OrderSend(pair,OP_BUY,LOT1, Ask,0,0,0,"HI",0,0,Green);
if (success > 0)
{
Print ("Order was sent. Now we\'re going to add SL and TP");
OrderSelect (success, SELECT_BY_TICKET, MODE_TRADES);
bool modif = OrderModify (success, OrderOpenPrice(), SL, TP, 0);
if (modif == false)
{
Print ("Fail to add TP and SL to ticket no "+success+" with error no "+GetLastError());
// must execute OrderModify() again
}
else
{
Print ("Success adding TP and SL");
}
}
else
{
Print ("Order was not sent and there is error "+GetLastError());
// should I re send the order ???
}
}
BTW, What IBFX AU account type you use. The mini account has prefix "m" in front of symbol.
What I meant was - if someone was dealing with "point", the value is likely to be 0.0001 or something, rather than 1,2 etc, rather than the issue of type double or type int. You can write scripts which compiles ok, but do we know the result when we run it?
I'm talking about having a double in there when an int is required, is very unlikely to work under any circumstances.
Just tell us the error description and we'll try to help you ...
BTW, What IBFX AU account type you use. The mini account has prefix "m" in front of symbol.
Nope, works just fine . . . I expect it gets typecast to 0
No need to ask other people, just ask your code to tell you like so:
The "else" is when your OrderSend works, which means you need to adjust the TP and SL - unless you intentionally don't want to.
Thank you. However, I have already the modify function in place once the trade opens. I just did not show it here.
That's when the "point" derived from somewhere has the value of zero to begin with, but interesting point so to speak.
Nope, I wrote a script with this . . .
. . . 30*Point is a double
Thank you. However, I have already the modify function in place once the trade opens. I just did not show it here.
What do you mean? Note it's point, not Point, which may or may not be the same thing.
That's right: the code for point is
point =MarketInfo(pair1,MODE_POINT)
Nope, I wrote a script with this . . .
. . . 30*Point is a double
That's right: the code for point is
point =MarketInfo(pair1,MODE_POINT)