Hi all, having probs with ECN broker.. - page 2

 
RaptorUK:

For a double 0 == 0.0 

Modification of the Open Price is prohibited . . . look at the column headers. 


ok, still trying to understand the code you just posted..

but as far as modifying open price, I wasnt trying to do that.. and if 0 =0.0 for a double, I still don't know what the problem is?

I cant figure out why i am getting error 130, if I have a 0 value for stop and takeprofit.. 

 
RaptorUK:

This is your issue . . .

  . . .  if you had printed the SL and TP values as part of your error reporting you would have seen this yourself.

 


ok, i am still new at this programming thing so didn't know to do that..  

since those lines are following the 'else' command shouldn't they be ignored if ECNbroker == true?

 
RaptorUK:

This is your issue . . .

  . . .  if you had printed the SL and TP values as part of your error reporting you would have seen this yourself.

 


can you tell me what is wrong with these lines from the above code??

 

else stop = Ask-BreakoutStop*Point;


        target = Ask+BreakoutTarget*Point;

 

 cuz I just do not know..

 

thanks again,

Sam 

 
sammy515:


can you tell me what is wrong with these lines from the above code??

cuz I just do not know..

The else applies just to the first line . . . the second line gets executed regardless . . .  just like the lines that follow it . . .  you should have done this . . .

else 
   {
   stop = Ask-BreakoutStop*Point;
   target = Ask+BreakoutTarget*Point;
   }
 

ok, I feel dumb.. of course it needs brackets! duh!

 

Thanks Raptor. much appreciated! I just needed another set of eyes..

I'll test this now..

 

Sam 

 
sammy515:

ok, I feel dumb.. of course it needs brackets! duh!

 

Thanks Raptor. much appreciated! I just needed another set of eyes..

I'll test this now..

Do yourself a big favour . . .  enhance your error reporting . . .  for example . . .

Print( "OrderSend(type=",  TradeOp, " , lots=", TradeSize, ", entry=", ToStr(TradeEntry), ", Ask: ", ToStr(Ask), ", Bid: ", ToStr(Bid), 
            ", SL=", ToStr(OrderSL), " , TP=", ToStr(OrderTP), " ", TradeComment, ", ... failed: ", GLError );

  . . .  if my OrderSend fails I print the type, the position size, the open price, Ask, Bid, SL, TP, trade comment and the error number . . .

 
RaptorUK:

Do yourself a big favour . . .  enhance your error reporting . . .  for example . . .

  . . .  if my OrderSend fails I print the type, the position size, the open price, Ask, Bid, SL, TP, trade comment and the error number . . .


Great idea, Raptor.. not only did you help me see my mistake, but I learned something new.. 

thanks again.

Sam 

Reason: