If error 130, shouldn't the ordersend fail ?

 
Hi
error 130 invalid stops

The order goes through. Is that normal or should the order just fail ?

I have trades showing in account history that still seem to be running as indicated on the chart
However, the trades tab shows no trades so I can't close them manually either

Please advise
Thanks

 
What is it that you see on the chart that indicates that the trade is still open?
 
GumRai:
What is it that you see on the chart that indicates that the trade is still open?

Thanks for the reply
Disregard the trade history/ trade tab subject, I think I figured this out.

What is on the chart is the green arrow for the buy / and blue line for tp

The history was showing the fluctuating trade profit/loss and I didn't understand why. I thought that this should have appeared in the trade tab so I could close it manually.
It appears that the trade was closed already and for some reason the amount of loss continued to fluctuate in the trade history and that is what I didn't understand.

That is why I thought the trade was still open because the trade history losses were still fluctuating like it was still open.

Anyhow disregard, that

However, I would like to know if the error 130 should fail and error or open a trade and produce the error message for the stop loss ?
I just wanted to know if that is normal for it to open with an error on stops ?
Thanks

 
Agent86:


However, I would like to know if the error 130 should fail and error or open a trade and produce the error message for the stop loss ?
I just wanted to know if that is normal for it to open with an error on stops ?
Thanks


  Does the OrderSend() include SL and TP or is it sent without those and then OrderModify() used to add the SL and TP?

  If the second, it is the OrderModify() that is failing, not the OrderSend(). 

 
GumRai:

  Does the OrderSend() include SL and TP or is it sent without those and then OrderModify() used to add the SL and TP?

  If the second, it is the OrderModify() that is failing, not the OrderSend(). 

I understand; and no OrderModify() only OrderSend() with SL and TP

I'll run it for a while again today to see if I can confirm the SL is actually being hit. I do NOT see the red SL object on the chart similar to the blue object for TP and green arrow for the actual order.

I'll post back later today to confirm this.
I can say it gave the error and Opened the order.

I guess the main question is:
Is it suppose to open the order on OrderSend() if a failed / invalid SL error ?
 
Agent86:
I understand; and no OrderModify() only OrderSend() with SL and TP

I'll run it for a while again today to see if I can confirm the SL is actually being hit. I do NOT see the red SL object on the chart similar to the blue object for TP and green arrow for the actual order.

I'll post back later today to confirm this.
I can say it gave the error and Opened the order.

I guess the main question is:
Is it suppose to open the order on OrderSend() if a failed / invalid SL error ?




If you try to open an order and you get an error 130, your order WILL NOT BE OPENED.

Check your code.

 
Agent86:
I understand; and no OrderModify() only OrderSend() with SL and TP

I'll run it for a while again today to see if I can confirm the SL is actually being hit. I do NOT see the red SL object on the chart similar to the blue object for TP and green arrow for the actual order.

I'll post back later today to confirm this.
I can say it gave the error and Opened the order.

I guess the main question is:
Is it suppose to open the order on OrderSend() if a failed / invalid SL error ?




Sounds like you are reporting the error that occurred somewhere else . . . add more Print() statements and find where the actual error is coming from.  Only report an error when there is one to report . . .
Reason: