(ERROR) Expert not placing stop losses. - page 2

 

This is simple scripts to open buy. 

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
  double sl, tp;
  int ticket = OrderSend(Symbol(),OP_BUY,0.1,Ask,50,0,0,NULL,0,0);
  if(ticket>0) {
      sl = Ask - 1000*Point;
      tp = Ask + 1000*Point;
      ticket = OrderModify(ticket,OrderOpenPrice(),sl,tp,0);
  }
             
  }
//+------------------------------------------------------------------+
 
Nguyen Nga:

This is simple scripts to open buy. 

Thank you very much for the script, but can I ask you why are you showing me this script? You think I might have made some mistake in the modification order sending code that the SL/TP prices are not transmitted and accepted by the broker?
 
PCWalker:
Thank you very much for the script, but can I ask you why are you showing me this script? You think I might have made some mistake in the modification order sending code that the SL/TP prices are not transmitted and accepted by the broker?

If you use ECN Broker then you can not send the stoploss with the OrderSend() function, you have to open a order sl=0;tp=0; first and then send a OrderModify() to set the sl/tp values.

We have very little info to go with other then you seem to have a robot compiled on two different compiler builds and one seems to work the other not this is more of a guessing game if you ask me.

 
Marco vd Heijden:

If you use ECN Broker then you can not send the stoploss with the OrderSend() function, you have to open a order sl=0;tp=0; first and then send a OrderModify() to set the sl/tp values.

We have very little info to go with other then you seem to have a robot compiled on two different compiler builds and one seems to work the other not this is more of a guessing game if you ask me.

I understand, well, I have solved the problem, thank you for your help.
 
PCWalker:
I understand, well, I have solved the problem, thank you for your help.
Well we would be eager to know how exactly you did that and what caused it for future referencing.
 
Marco vd Heijden:
Well we would be eager to know how exactly you did that and what caused it for future referencing.
If, I would give you an answer on that, it would expose part of the manipulation I am performing to ever growing demand in the market. And then I am hinting or rather changing my plans, which would be not quite efficient to the development of the code, as the market in this matter is the observer on the elementary particle which is the quantum code. :-) I hope you have studied a little bit quantum physics to understand what I mean. Thank you.
 
PCWalker:
If, I would give you an answer on that, it would expose part of the manipulation I am performing to ever growing demand in the market. And then I am hinting or rather changing my plans, which would be not quite efficient to the development of the code, as the market in this matter is the observer on the elementary particle which is the quantum code. :-) I hope you have studied a little bit quantum physics to understand what I mean. Thank you.

You opened up this topic, asking us if we had any ideas, and now that you found the solution, you refuse to explain it.

That has got nothing to do with quantum physics but all with a one way road called greed, and we are not here for greed we are here TO SHARE so maybe your at the wrong table.

Please in the future, refrain from opening topics whenever you come across a problem if you play it out like this.

 
Marco vd Heijden:

You opened up this topic, asking us if we had any ideas, and now that you found the solution, you refuse to explain it.

That has got nothing to do with quantum physics but all with a one way road called greed, and we are not here for greed we are here TO SHARE so maybe your at the wrong table.

Please in the future, refrain from opening topics whenever you come across a problem if you play it out like this.

I am sorry, You got me wrong, but my EA is playing with some price action ask bid spread, and the functions I used caused the broker to reject my requests, so I had to change some code in order to accept the rules of the game.

I am sorry that my code caused all this problem. if you feel that I am greedy, we share here informations and opinions out of free will, if your time is very precious and you feel that I need to disclose all the my code in order to get you encouragingly satisfied, I am very sorry, to tell you that you are the one that is greedy not me.

Which is again related to something I told you in the past, "it takes one to know one." 

Thank you for you time. 

 
PCWalker:

I am sorry, You got me wrong, but my EA is playing with some price action ask bid spread, and the functions I used caused the broker to reject my requests, so I had to change some code in order to accept the rules of the game.

I am sorry that my code caused all this problem. if you feel that I am greedy, we share here informations and opinions out of free will, if your time is very precious and you feel that I need to disclose all the my code in order to get you encouragingly satisfied, I am very sorry, to tell you that you are the one that is greedy not me.

Which is again related to something I told you in the past, "it takes one to know one." 

Thank you for you time. 

It's a bit simpler then that.

Nobody is asking you to disclosure your code, just the solution to the problem, so that others in the future can benefit from this discussion.

That's what i believe this community is for.

But You seem to be of the taking kind only, maybe not greedy. but selfish to say the least.

Just the solution would suffice is that so hard to see.

 
Marco vd Heijden:

It's a bit simpler then that.

Nobody is asking you to disclosure your code, just the solution to the problem, so that others in the future can benefit from this discussion.

That's what i believe this community is for.

But You seem to be of the taking kind only, maybe not greedy. but selfish to say the least.

Just the solution would suffice is that so hard to see.

I told you, too many requests, to a broker that doesn't want to accept. That is the most simple answer I can give. Thank you for your kind knowledge and all your help.

Remember that you are always blessed, no energy is ever vanished. It only changes form and returns back to the source. 

Reason: