Your question is vague,
What you just said is.
I found bolt, that holds a screw firm.
I have a car with a steering wheel, where do i put the bolt.
Provide more data
How are ur orders opened.
- Why did you post your MT4 question in the Root / MT5 General
section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - ERR_NO_RESULT
You Server Change the SL to X It is at X! Change the SL to X It is at X! Change the SL to X You are insane Insanity: doing the same thing over and over again and expecting different results.Compute the new value, then check that you are moving the existing value at least a tick. PIP, Point, or Tick are all different in general.
Unknown
What is a TICK? - MQL4 programming forum - A TSL only moves in the direction of the trade. Your code can go either direction.
-
if(OrderType()==OP_SELL){ StopLoss=iHigh(NULL,0,1);
You buy at the Ask and sell at the Bid. So for buy orders you pay the spread on open. For sell orders you pay the spread on close.- Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid reaches it. Not the Ask. Your SL is shorter by the spread and your TP would be longer. Don't you want the same/specified amount for either direction?
- Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask reaches it. To
trigger at a specific Bid price, add the average spread.
MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25 - The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hey,
I found this stoploss code, first off, what do you think of it? Secondly how would i integrate it into the code I already have which is 990 lines long?
Thanks guys
Nat