Script to open order modification

MQL4 Sripts

Trabajo finalizado

Plazo de ejecución 1 día
Comentario del Ejecutor
great and nice customer
Comentario del Cliente
He complete the job in just couple of hours. Satisfied with this project and will hire him again in the future.

Tarea técnica

This is how my current script works:  I have a script (simple short script that has only 50 lines of coding) that place Sell Limit, Sell Market, Sell Stop orders with predetermined SL and TP with some other options like UseMoneyMgmt.  (leave 0 to disable SL/TP) When SetEntryPrice is left 0, it opens market order, but when I put x.xxxx  on SetEntryPrice , script will place 1 pending order (Sell Limit or Sell Stop order depend on what price I entered against current price at the time of running script).  Example:  At the time of executing this script, if current price = 1.25000, if I put OrderPrice = 1.25600, script will place pending Sell Limit order.  If I put OrderPrice = 1.24300, script will place pending Sell Stop order. If I put OrderPrice = 0 (left this setting to 0), script will place Sell Market order immediately.  

The script currently have these options:

extern double InitialLots = 0.1;

extern bool   UseMoneyMgmt = false;

extern double RiskPercent = 2;

extern bool   UseStop = true;

extern bool   UseTakeProfit = true;

extern double StopLoss = 15;

extern double TakeProfit = 50;

extern string Note="0 in SetEntryPrice field means Market Order Sell";

extern double SetEntryPrice = 0.0000;

 

//the following options to be add for this job

Extern bool EnableExtraOrders = true (or false); // if set to false, script should run ‘AS IS’.

extern int     PendingOrderPriceDist = 10 ;  // (value in pips)

extern double LotSizeIncrementForSellLimitOrder= 0.1(or -0.3) ; // this setting can be plus or minus   

extern double LotSizeIncrementForSellStopOrder= 0.2(or -0.4);  // this setting can be plus or minus   

 

This Job Request:

1)   I would like to add script to add following options.

·         PendingOrderPriceDist = 10; // 10 is user input and this number should be in pips. 

·         LotSizeIncrementForSellLimitOrder= 0.1 (or -0.1) ;   // user input   

·         LotSizeIncrementForSellStopOrder= 0.2 (or -0.2);  // user input  

Note:

** This option is only applied when I run script to place MarketOrder (In otherwords, this option should only execute when I run script with SetEntryPrice = 0.0000 and EnableExtraOrders = true)  These extra pending order's lotsize maybe larger or smaller than InitialLotSize. 

** SL,TP for these pending orders should be same as Initial Market Order.  So, TP & SL is set for Market order, these pending orders should be same as the Initial Market order’s SL and TP 

** LotSizeIncrement should be always calculated from the Initial Market Order’s LotSize.  So, if MarketOrder was used with InitialLotsize = 1,  LotSizeIncrement should be calculated from 1.  If UseMoneyMgmt= true, RiskPercent = 2, LotSizeIncrement should be calculated from the RiskPercent LotSize.

Example A:  Current Price = 1.25000, Initial LotSize = 1  when I run script with extern double SetEntryPricePrice = 0.0000;  extern int pendingOrderPriceDist = 10 ;  extern double LotSizeIncrementForSellLimitOrder= 0.1 ;    extern double LotSizeIncrementForSellStopOrder= 0.2 ;  Script should place   1 lot Sell order immediately @ 1.25000 and also place 1.1 lot, Pending SellLimit order at 1.25100 and place1.2 lot, 1 pending SellStop order at 1.24900.     

Example B:  Current Price = 1.25000, Initial LotSize = 1  when I run script with extern double SetEntryPricePrice = 0.0000;  extern int pendingOrderPriceDist = 10 ;  extern double LotSizeIncrementForSellLimitOrder=  -0.1;    extern double LotSizeIncrementForSellStopOrder=  -0.2;  Script should place   1 lot Sell order immediately @ 1.25000 and also place 0.9 lot, Pending SellLimit order at 1.25100 and place 0.8 lot, 1 pending SellStop order at 1.24900.    

2)   When compile the script, I would like warning free. Currently, it has 1 warning à  " return value of OrderSend should be checked"  - When it is all done and I would like warning free.

 I will provide source code for the script after job has assigned to the coder. 

Han respondido

1
Desarrollador 1
Evaluación
(320)
Proyectos
523
66%
Arbitraje
52
21% / 38%
Caducado
167
32%
Trabaja
2
Desarrollador 2
Evaluación
(514)
Proyectos
776
63%
Arbitraje
33
27% / 45%
Caducado
23
3%
Libre
3
Desarrollador 3
Evaluación
(195)
Proyectos
395
28%
Arbitraje
155
20% / 52%
Caducado
112
28%
Libre
Solicitudes similares
I’m looking for someone experienced with Think or Swim to create a backtesting script for an in-the-money Iron Condor strategy using options on the SPX. The strategy involves setting up 10 contracts of an Iron Condor with a 10-point spread width and a net credit requirement of $11 per contract. The goal is to backtest the performance over the last three years, focusing on trades where the SPX closes outside a
I currently have a license code that connects to my web server, and I add the account number, client name, and expiration date. I’d like something more automated. Currently I allow clients 10 licenses, but adding for them on my side can get exhausting. I’d like a better solution for myself and clients

Información sobre el proyecto

Presupuesto
10 - 15 USD
Para el ejecutor
9 - 13.5 USD
Plazo límite de ejecución
de 1 a 3 día(s)