fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    How to make buy stop, sell stop script

    General Discussions
    2
    2
    1583
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Voyager1965r last edited by

      Hello,

      How above, how to make script buy stop and sell stop (10 pips from current price) and take profit with 25 pips?
      I want this script to NFP news.

      Thank you for your responds.

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        Note that "Script" is different that "Expert Advisor". Both are similar, but something is very different - Scripts work once. I'm not sure that you are asking for a Script.

        But anyway. I think it's enough to make 2 pending orders. You can find the blocks for that. Note that in these blocks (let's say "Buy pending order") you don't have an option to define the type of the order. The type is automatically decided by the open price. What you need to define is the price at which the order will be opened. By default for Buy order that price is Ask + 20 pips. You can see that Ask is selected and there is 20 in "Price offset". If you change 20 to -20 you will see that the order will be created on the opposite side.

        And you have SL and TP options, so you can set that TP of 25 pips.

        There is something more interesting. You can use 2 blocks, one for Buy and one for Sell and that's ok. But if you want to close the Sell order when the Buy order is triggered (or to close the Buy when the Sell is triggered), then you can create only one block (let's say Buy pending order) and enable the OCO option. Now this block will create 1 Buy and 1 Sell order, and when one of them is triggered, the other will be deleted automatically.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        Online Users

        A
        S
        I
        H
        M
        D
        A
        W

        17
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors