Check for TP take profit script

Results 1 to 4 of 4
 0 Attachment(s)    

Thread: Check for TP take profit script

  1. #1

    Default Check for TP take profit script

    Can somebody help me with a script that would make sure tp is specified?
    My ea (ilan) sometimes does not specify tp once order is placed but will once another order after that is placed.

  2. #2


    By increasing Sleep time, will that help to ensure take profits are always set?

  3. #3
    Administrator funyoo's Avatar
    Join Date
    Sep 2008


    Hi tkaboris,

    It is due to the requotes,

    You should try to copy paste the conditions that modify the SL and to replace NewOrdersPlaced by something that determines the last stop loss, if this stop loss == 0 then apply the global stop loss to all trades.

  4. #4


    You should also include a line which does something similar to this before setting or modifying your SL to prevent any errors resulting from it being too tight:

    if(SL>(Bid-MarketInfo(Symbol(),MODE_STOPLEVEL)*Point)) SL=Bid-MarketInfo(Symbol(),MODE_STOPLEVEL)*Point;
    That line will work for long SLs and you'd just need to modify it slightly for short SLs. Likewise, you can easily modify it for TPs as well.
    Last edited by jezzer1961; 04-20-2009 at 12:46.

Similar Threads

  1. Replies: 6
    Last Post: 02-18-2016, 20:12
  2. How to check swappiness ?
    By fxtester in forum General discussion
    Replies: 1
    Last Post: 04-13-2015, 10:34
  3. Check my EA and please add EMA filter
    By smartone in forum Ideas for expert advisors
    Replies: 0
    Last Post: 06-12-2010, 12:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Check for TP take profit script

GadgetVersus GadgetVersus France W3Ask W3Ask Brasil W3Ask Deutschland W3Ask Espaņa W3Ask France W3Ask Italia W3Ask Nederland