We recommend:

  1. Home
  2. Scripts
  3. Script for remove orders targets: Take Profit and Stop Loss

Script for remove orders targets: Take Profit and Stop Loss

Script for deleting order targets

The purpose of this script is extremely simple: removing the targets of your open orders faster than you could.

The script has a number of settings with which you can remove targets as in general all orders that you have in the trade, and only certain, suitable for the conditions. You can choose what you want to remove: Take Profit or Stop Loss.

This script is convenient both when working with single orders, and when working with grids or next to a pyramid order.

Script settings:

Delete Take ProfitPermission to remove Take Profit.
Delete Stop LossPermission to remove Stop Loss.
Choose Order DirectionChoosing the direction of an open transaction: only purchases, only sales, or both directions.
Magic NumberInclude a magic number for closed orders. If the value is -1 all the magic will be taken into account.
Orders SymbolWhich one to modify: the current one on which the script is installed, or everything in the market.
Orders CommentInclude a well-known comment of the order on which the search will be carried out (you can specify only part). Or leave the field blank, then the comment will not be taken into account.
Orders TicketInclude a specific order ticket that needs to be modified or leave a value of 0 for all tickets. If the ticket is found, the rest of the filters will not be counted.

An example of how the script works:

Suppose we have four orders in the market, two of which are open with a commentary or magic number with the “DaVinci Open order with given Magic Number” script:

We need to remove only Take Profit two orders for a pair of GBPCHF, we can just install the script on this pair and select in the settings only the current Symbol for modification, knowing that in addition to these two necessary orders the other is no longer in the market. Or, if there were more orders for the pair, you could choose a filter for the magic, which we know it is 1111 or direction. Set these settings:

As you can see in the screenshot below, these goals have been adjusted, we have retired Take Profit on both orders OF GBPCHF, the script interacted only with them.

If you need to modify only a specific order – no problem, just specify its ticket in the settings, then the rest of the filters will not be taken into account.

Simplicity is the key to success!

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed