OrderCloseBy - page 2

 
Wow - Grace. Now why you gonna revive one of my old noobish treads. You're probably getting wrong function because you don't have OrderCloseBy() option provided by your broker. For additional help, post some codes :)
 

can you write a robot that has this function please give us an example

 

I may sound like I know what I'm talking about from time to time. But I'm really just a newbie programmer as far as I'm concerned. People like JJC and Gordon could probably code and explain it inside out. Humm, I wonder what happened to them? So, sorry I don't see what purpose that function within a example would serve.

 

Note: The OrderCloseBy() is pretty useless because it would Not automatically save you a pip on closing an order unless you had an Opposite order which you wanted to close as well. As Gordon pointed out, a rare example of when this function would be helpful is in fast markets. You have allot of orders opened say (20 orders long) and the market is going against you fast. So, you open an opposite order so that it get the gains while you close your allot of orders (20 orders long) against your opposite order. I can only hope my example helps.

Reason: