is this possible
Results 1 to 2 of 2

Thread: is this possible

  1. #1
    Can one execute two scripts on precisely the chart, such that if the first script has been executed the next one comes into effect.

    This is an example:

    I set 2 pending transactions at the onset of the daily candle. A Buy stop at the hi of the previous day's candle, and a sell stop at the lo of their previous day's candle (neglect disperse for the minute). When a transaction is triggered (buy stop state) another transaction (sell stop) is automatically cancelled (OCO-one call cancels other). I already have a script that does this. Both the buy stop and the sell stop have a fixed quantity of Stop loss (60 pips state) plus a set quantity of Require profit (100 pips state).

    This is the tricky part: I now wish to specify a pending order, following my OCO is triggered, that takes a transaction in the opposite direction, if my S/L is struck for my oco trade. This second trade will also have T/P and the S/L of 100 and 60 pips.

    In the moment what I am doing is

    1. Putting an oco order.
    2. When my OCO has been triggered, mT4 sends an alarm to me.
    3. I set the 2nd pending order.

    Any ideas, questions or comments will be appreciated

  2. #2
    You can't attach 2 scripts to 1 chart in the same moment.

    But considering your needs, you do not need 2 scripts. Modify the script to place the pending order directly once it does the one cancel the other job.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.