OCO MT4 Script + Forex Signals 16th Feb

Let me start by saying thanks to Felipe who has generously offered to help regarding OCO orders. You can download OCO MT4 script Here.

Here are the instructions written by Felipe himself on how to use it:

  • Once you insert the OCO script into the chart you have to make sure that on the COMMON parameters the “Allow live trading” is checked.
  • On the INPUTS parameters, here are the variables and values:
    • BuyOrderPrice   – 0.0 (you have to put the price, eg. 1.3940)
    • BuyLots         – 0.1 (default at 0.1 but you can modify to 1 lot, eg 1.0)
    • BuyStopLoss     – 50 (default is 50 pips. You don’t put the price, you put the amount of pips you want away from the price on BuyOrderPrice)
    • BuyTakeProfit   – 50 (default is 50 pips. Same as BuyStopLoss but for profit)
  • The same goes for the Sell parameters
  • BuyOrderType and SellOrderType and Slippage- DO NOT TOUCH THOSE
  • Magic – You will have to change the number every time you use it more than once at a time. Eg. You want to use on two currency pairs, you need to change the Magic number. They have to be different.
  • If the user decides to cancel the orders, he/she has to delete both orders and remove script (twice). I know it’s not an ideal solution but I’m not a coder so I don’t know how to modify that.

If you have any questions try posting them here, I am sure we can work it out together.

Update at 5PM EST / 10 PM GMT / 0000 Hour Candle:

Order ID: 2 | Update | $GBPJPY Sell 140.75 | Move Stop Loss to 141.05
Order ID: 3 | Update | $EURJPY Sell 122.40 | Currently at +5
Order ID: 5 | Update | $GBPUSD Buy 1.5695 | Currently at -30
Order ID: 6 | Update | $EURUSD Sell 1.3575 | Waiting to get filled
Order ID: 7 | Update | $CADJPY Sell 85.55 or Buy 86.05 | Waiting to get filled

Update at 9PM EST / 2 AM GMT / 0400 Hour Candle:

Order ID: 2 | Update | $GBPJPY Sell 140.75 | Closed out at -30
Order ID: 3 | Update | $EURJPY Sell 122.40 | Move Stop Loss to 122.75
Order ID: 5 | Update | $GBPUSD Buy 1.5695 | Currently at -10
Order ID: 6 | Update | $EURUSD Sell 1.3575 | No Fill, Cancel Order
Order ID: 7 | Update | $CADJPY Sell 85.55 or Buy 86.05 | Waiting to get filled

Order ID: 8 | Order Cancels Order | $GBPJPY Sell 140.80 or Buy 141.25 | Stop Loss: 45 Pips | Take Profit: 70-140-210 Pips
Order ID: 9 | Order Cancels Order | $EURUSD Sell 1.3580 or Buy 1.3635 | Stop Loss: 55 Pips | Take Profit: 40-80-120 Pips

Update at 1AM EST / 6 AM GMT / 0800 Hour Candle:

Order ID: 3 | Update | $EURJPY Sell 122.40 | Closed out at -35
Order ID: 5 | Update | $GBPUSD Buy 1.5695 | Currently at +10
Order ID: 7 | Update | $CADJPY Sell 85.55 or Buy 86.05 | Not Yet Filled
Order ID: 8 | Update | $GBPJPY 141.25 | Currently at -25
Order ID: 9 | Update | $EURUSD Buy 1.3635 | Currently at +10

Order ID: 10 | Order Cancels Order | $EURJPY Sell 122.35 or Buy 122.85 | Stop Loss: 50 Pips | Take Profit: 50-100-150 Pips

Update at 5AM EST / 10 AM GMT / 1200 Hour Candle:

Order ID: 5 | Update | $GBPUSD Buy 1.5695 | Move Stop Loss to 1.5665
Order ID: 7 | Update | $CADJPY Sell 85.55 or Buy 86.05 | Waiting to get filled
Order ID: 8 | Update | $GBPJPY Buy 141.25 | Currently at -20
Order ID: 9 | Update | $EURUSD Buy 1.3635 | First Profit Target Reached at +40 | Move Stop Loss to -27
Order ID: 10 | Update| $EURJPY Buy 122.85 | Currently at Break Even

Update at 9AM EST / 2 PM GMT / 1600 Hour Candle:

Order ID: 5 | Update | $GBPUSD Buy 1.5695 | Closed out at -30
Order ID: 7 | Update | $CADJPY Buy 86.05 | Currently at +5
Order ID: 8 | Update | $GBPJPY Buy 141.25 | Closed out at -45
Order ID: 9 | Update | $EURUSD Buy 1.3635 | Currently at +35
Order ID: 10 | Update| $EURJPY Buy 122.85 | Currently at +15

Order ID: 11 | Order Cancels Order | $GBPUSD Sell 1.5655 or Buy 1.5710 | Stop Loss: 55 Pips | Take Profit: 50-100-150 Pips
Order ID: 12 | Order Cancels Order | $GBPJPY Sell 140.65 or Buy 141.40 | Stop Loss: 75 Pips | Take Profit: 70-140-210 Pips

Update at 1PM EST / 6PM GMT / 2000 Hour Candle:

Order ID: 7 | Update | $CADJPY Buy 86.05 | Second Profit Target Reached at +80 | Move Stop Loss to Break Even
Order ID: 9 | Update | $EURUSD Buy 1.3635 | Third Profit Target Reached at +120
Order ID: 10 | Update| $EURJPY Buy 122.85 | Third Profit Target Reached at +150
Order ID: 11 | Update| $GBPUSD Sell 1.5655 | Closed out at -55
Order ID: 12 | Update| $GBPJPY Buy 141.40 | First Profit Target Reached at +70 | Move Stop Loss to -37 Pips

If you new to our blog then please read Forex Signals and Forex Signals FAQ

Related Posts:

Receive Forex Signals, Articles and latest Market Analysis straight in your Inbox by subscribing below:

20 Responses to “OCO MT4 Script + Forex Signals 16th Feb”

  1. Dani 16 February 2010 at 7:02 am #

    Horrible embarrassing question but how do I get the OCO script into the chart?

  2. ross 16 February 2010 at 9:47 am #

    Thanks to Felipe for the script. I also have an EA that has entry long and entry short inputs and 3 take profit levels, but it needs to be modified to make the entry levels market orders. If Felipe is up for that I can share that too…thanks again…

    PS – Dani – you just double click the script or drag it onto the chart – either way works…

    • Dani 16 February 2010 at 10:57 am #

      ross… How do I download it onto the trading platform? I know all about dragging ….I just need the system set up to have something to drag over :-) Thanks so much….

    • Felipe 17 February 2010 at 4:05 am #

      Hey Ross,

      I'll take a look… add me on skype (felipefxr) we'll chat there!

      ~ Felipe

  3. murat 16 February 2010 at 10:10 am #

    Hello,
    exuse me for the "out-of-topic". just to ask, FP which is the performance of last week.
    thx

    • FirePips 16 February 2010 at 6:11 pm #

      Hi Murat,

      I haven't finished compiling the final tally yet. Delaying it for psychological reasons.

  4. Kris 16 February 2010 at 11:42 am #

    Dani,

    Download the script direct to the platform or I usually download to my desktop first. Then right-click/copy the script to the following folder: C: drive > Program files > Metatrader 4 folder > experts > scripts. Paste it here in this folder. Close the MT4 and reopen. Your new script is ready now and can be found under the navigator panel.

    • FirePips 16 February 2010 at 6:11 pm #

      Thanks Kris for your input :)

  5. Felipe 17 February 2010 at 4:00 am #

    I hope everyone is enjoying the OCO script… again just put it on experts/scripts folder, restart the MT4 and you will see it there… just drag it to the platform and choose the parameters… try on a demo account first so you can feel comfortable first. Thanks Kris for explaining earlier! :)

    Wishing the best and get 'em pips!

    ~ Felipe

    • Doug 18 February 2010 at 2:06 am #

      Felipe,

      Would the solution for 3 take profit targets just be to add this OCO script to 3 different charts?

  6. Pierre 16 February 2010 at 6:53 pm #

    Just one word :
    "you need to change strategy blah blah"

    Order ID: 7 | Second Profit Target Reached at +80
    Order ID: 9 | Third Profit Target Reached at +120
    Order ID: 10 | Third Profit Target Reached at +150

    my 2 cents :)

    was following your advises with much smaller TP as previous days were 'bad', if i known …

  7. Adrian 16 February 2010 at 10:46 pm #

    Excellent day today, well done and thanks.

  8. @adrilyss 18 February 2010 at 8:36 am #

    done all but when click twice or drag script, then this show up

    ERROR #4107: invalid price parameter for trade function

    • Felipe 19 February 2010 at 4:36 am #

      @adrilyss

      Error 4107 means that you have not "Allow Live Trading" on the Common Parameter… Make sure that's checked.
      :)

  9. Alexander 21 March 2010 at 10:09 am #

    The same question remains to be unanswered!!!

  10. Cristian 24 March 2010 at 5:15 pm #

    I see there is only one Take Profit. How do you do it with this OCO script to partially close 1/3 when you reach the first TP, and again another 1/3 when you reach the second TP, and so on ?

    Thanks

  11. one 31 March 2010 at 11:18 pm #

    done all but when click twice or drag script, then this show up

    ERROR #130: invalid stops

  12. germeten 26 September 2010 at 5:36 am #

    Felipe:

    This is great; question/favor to ask: Could you set the price input as pips + or – from current market price? Also, a trailing stop would be nice too, and a repeat function that would let this run as an EA. Thanks again!

    germeten at yahoo dot com

  13. Sadhu Babul 14 April 2011 at 6:47 am #

    Hi Felipe, thnx 4 this OCO script. but while using it i observed: 1. the blinking text "…….editted by Felipe…" appears only for some time, then it closes. So, does it mean that the Script has stopped working? 2. i think so this script expires after sometime. its doesn't work continuously. after sometime (i don't know after how much time), the script seems to have stopped working because, the pending orders will be there in the trades list, if one of them is executed, the other does not get removed automatically which this script has to do. i have seen that while that text is blinking, if one of the OCO order executes, the other cancels but when the blinking goes, if one is executed, the other is not removed. (this is what i observed but don't know if there's any logic). Please help me if there are any setting to be changed and I want this script to run continously until i delete the orders manually. Rgds, Sadhu

  14. Harts 8 September 2011 at 12:25 am #

    Please add a Trailing Stop too , I’, waiting you a modification your scripts and don’t forget to email me if you was put a Trailing Stop. thanks


Leave a Reply

To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create