Your Code....
double Price = Bid; // Open Sell Limit SellLimit = OrderSend(Symbol(),OP_SELLLIMIT,LotSize,Price,5,SellLimitSL,SellLimitTP,"SellLimit Order",MagicNumber,0,Green); /* IS it FOR YOU that you can open pending at Bid or Ask ?? Why not // Calculate SL & TP For Sell Limit double SellLimitSL = DayHigh + StopLoss; double SellLimitTP = DayHigh - TakeProfit; if(Price < DayHigh " - STOPLEVEL " && SellLimit == 0) // Open Sell Limit SellLimit = OrderSend(Symbol(),OP_SELLLIMIT,LotSize,DayHigh,5,SellLimitSL,SellLimitTP,"SellLimit Order",MagicNumber,0,Green); */
Read the rules and limitations again how to open a new trade then start this coding the way it has to be
deVries:
/* IS it FOR YOU that you can open pending at Bid or Ask ??
Im not sure what you mean by this?
if(Price < DayHigh " - STOPLEVEL " && SellLimit == 0)
// Open Sell Limit
SellLimit = OrderSend(Symbol(),OP_SELLLIMIT,LotSize,DayHigh,5,SellLimitSL,SellLimitTP,"SellLimit Order",MagicNumber,0,Green);
I understand most of this however the " -STOPLEVEL" confuses me, what is this here for?
Ill try to make some of the changes and see what happens.
Im not sure what you mean by this?
I understand most of this however the " -STOPLEVEL" confuses me, what is this here for?
Ill try to make some of the changes and see what happens.
Cool. Yea, I have read through those earlier today to make sure I understood them. To be sure I know what the MODE_STOPLEVEL value is, I am trying to call it and put it in a comment, however, I see only to be getting 0.00000 in the comments is this the correct way to call it?
double MI = MarketInfo(Symbol(),MODE_STOPLEVEL);
Cool. Yea, I have read through those earlier today to make sure I understood them. To be sure I know what the MODE_STOPLEVEL value is, I am trying to call it and put it in a comment, however, I see only to be getting 0.00000 in the comments is this the correct way to call it?
Ok, so still having issues with this Error #130.
I have a demo account with GFT, and after many conversations with them, they believe that they do not set a MODE_STOPLEVEL & MODE_FREEZELEVEL, these are up to us to set?!? (I thought that they set those rates/levels???). So I can only assume, that my result of 0.0 from the MODE_FREEZELEVEL is correct.
Anyway, these S/L & T/P are quite a way from the current price, ~30 pips or so.
GFT say they are a market maker, so I should not have to normalize (from what I can understand). So where else could the problem be??
I am getting the error on every order, be it buy or sell, however if I make them pending, then it places them.
So does anyone have ideas??? ( I am very new to this, so constructive feedback helps!)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello Everyone.
I am having a problem with Error #130 (I have looked through the documentation and have not found anything that can help me so far). I have attached the code below - aside from the other issues in the code, I am just focusing on this for the moment.
For some reason, if I change the OP_BUY & OP_SELL to OP_BUYSTOP & OP_SELLLIMIT they work, as OP_BUY & OP_SELL they do not. I have tried rearranging the code, and still have the same problem.
I demo trade with GFT, who are a Market Maker, and not an ECN, hence are 5 digits, I don't think this is the problem, as it works when I make them pending orders rather than immediate orders. Any ideas? (Also, I am a rookie, constructive feedback helps me learn best)
Thanks