Scripts: Pending orders DOWN - page 5

 

Is there an MT4 version of this?

 
leidsure :

Is there an MT4 version of this?

No, it doesn't. The old dock has long since been thrown in the bin.

 
How can I change the trading volume? It is always 0.01
 
leidsure :
How can I change the trading volume? It is always 0.01

To do this, you must edit the code.

 
hello sir, can you help me a little bit to change the parameters "GAP" with the calculation of pips into a price, for example for xau / usd 1701 or 1702 as the point of my first pending order, so it will be more flexible in setting the target price of the pending order at the desired, thank you very much sir, 
 
Anhedonia # :
hello sir, can you help me a little bit to change the parameters "GAP" with the calculation of pips into a price, for example for xau / usd 1701 or 1702 as the point of my first pending order , so it will be more flexible in setting the target price of the pending order at the desired, thank you very much sir, 

Use the 'Gap for pending orders DOWN from the current price' parameter

 
Vladimir Karputov #:

Use the 'Gap for pending orders DOWN from the current price' parameter

thank you very much sir, this is will be very helpful,
 

Dear Vladimir Karputo,


thank you very much for this script, this is exactly what I needed.

May I ask your help to modify something?


This script add a new TP and a new SL for each pendings. I would like the same TP and SP from actual price.


example: curent price is 1000

TP= +100 from actual price

SL= -300 from actual price


pending 1 = TP=1100 and SP=700

pending 2 = TP=1100 and SP=700

pending 3 = TP=1100 and SP=700


I am no dev but I believe it should be somewhere here:

if(InpDownOrders==buy_limit)
        {
         double sl         = (ExtStopLoss==0.0)   ? 0.0 : price_ask - ExtStopLoss;
         double tp         = (ExtTakeProfit==0.0) ? 0.0 : price_ask + ExtTakeProfit;
         m_trade.BuyLimit(m_symbol.LotsMin(),m_symbol.NormalizePrice(price_ask),m_symbol.Name(),
                          m_symbol.NormalizePrice(sl),
                          m_symbol.NormalizePrice(tp));
        }
      else
        {
         double sl         = (ExtStopLoss==0.0)   ? 0.0 : price_bid + ExtStopLoss;
         double tp         = (ExtTakeProfit==0.0) ? 0.0 : price_bid - ExtTakeProfit;
         m_trade.SellStop(m_symbol.LotsMin(),m_symbol.NormalizePrice(price_bid),m_symbol.Name(),
                          m_symbol.NormalizePrice(sl),
                          m_symbol.NormalizePrice(tp));
 
tonyalcapon # :

Dear Vladimir Karputo,


thank you very much for this script, this is exactly what I needed.

May I ask your help to modify something?


This script add a new TP and a new SL for each pendings. I would like the same TP and SP from actual price.


example: curent price is 1000

TP= +100 from actual price

SL= -300 from actual price


pending 1 = TP=1100 and SP=700

pending 2 = TP=1100 and SP=700

pending 3 = TP=1100 and SP=700


I am no dev but I believe it should be somewhere here:

There is already a code like this: Pending orders UP DOWN Single SL and TP :

The script places several pending orders UP and DOWN from the current price. All have the same Stop Loss (the same price) and the same Take Profit (the same price)

Pending orders UP DOWN Single SL and TP



 

Dear Vadimir,


thank you very much for your fast reply, much appreciated.

This script is *** PERFECT *** for me.


I noticed a problem with TP and SP, the script doesnt apply the set values. wahthever the values it will set TP and SP at around 700 pips

In my case:

input ENUM_PENDING_ORDERS_DOWN   InpDownOrders     = buy_limit;      // Type of pending orders DOWN
input ushort                                           InpDownGep        = 200;            // Gap for pending orders DOWN from the current price
input ushort                                           InpDownStep       = 200;             // Step between orders DOWN (in pips)
input double                                          InpDownLots       = 0.01;           // Lots DOWN
input uchar                                            InpDownQuantity   = 4;              // DOWN quantity ('0' -> OFF)
input grou                                            "Additional features"
input ushort                                         InpStopLoss       = 1000;             // Stop Loss
input ushort                                         InpTakeProfit     = 100;             // Take Profit
input ulong                                           InpDeviation      = 30;             // Deviation
input ulong                                           InpMagic          = 201;            // Magic number