Hi there ! I have a small problem with an EA I am writing by the orders not being put in at all ... This is the code :
string TI;
iCustom(NULL, 0, "MEGATREND PROBABILITY METER II",13,6,0) ;
TI = ObjectDescription("trend_comment_");
All of the above returns the correct value that I want as either "SHORT" or "LONG"
Now if I write
if (TI == "SHORT")
OrderSend(Symbol(), OP_SELL,Lots,Bid,1,0,0,0,0,0,Red)
or
if (TI == "LONG")
OrderSend(Symbol(), OP_BUY,Lots,Bid,1,0,0,0,0,0,Green);
Now the TI value does get returned saying "LONG" or "SHORT" but no order is put in my metatrader ... any Ideas what I might be doing wrong?
Is it maybe the wrong values I am putting in the OrderSend function...?
Thanks a lot..!
string TI;
iCustom(NULL, 0, "MEGATREND PROBABILITY METER II",13,6,0) ;
TI = ObjectDescription("trend_comment_");
All of the above returns the correct value that I want as either "SHORT" or "LONG"
Now if I write
if (TI == "SHORT")
OrderSend(Symbol(), OP_SELL,Lots,Bid,1,0,0,0,0,0,Red)
or
if (TI == "LONG")
OrderSend(Symbol(), OP_BUY,Lots,Bid,1,0,0,0,0,0,Green);
Now the TI value does get returned saying "LONG" or "SHORT" but no order is put in my metatrader ... any Ideas what I might be doing wrong?
Is it maybe the wrong values I am putting in the OrderSend function...?
Thanks a lot..!