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

shakespeare515
71
shakespeare515  
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.. 

shakespeare515
71
shakespeare515  
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?

shakespeare515
71
shakespeare515  
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 

Simon Gniadkowski
17400
Simon Gniadkowski  
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;
   }
shakespeare515
71
shakespeare515  

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 

Simon Gniadkowski
17400
Simon Gniadkowski  
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 . . .

shakespeare515
71
shakespeare515  
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