Grid Management by Array

MQL4 Esperti Forex

Lavoro terminato

Tempo di esecuzione 5 giorni
Feedback del cliente
Excellent work!! Very fast and good communication. Will use again!
Feedback del dipendente
good customer

Specifiche

I am looking to build a grid trade manager per my directions below.  The idea is from Proper Bot, which is available in the Codebase as a sample.  My desired code is a simpler version.

OK---since we are starting from scratch, here is the minimum.  I don't need the volume check, the hours check, or the MA check. It is very simple. I need a grid trade manager that uses an array as described below.  You may wonder why I need the 0 condition included.....I plan on expanding this project for additional fee later.  Today's fee is for part 1.   Part 1:  Get the trade grid to function, without an indicator, using a manual switch, with a close all in FIFO order for the 0 condition.

input int         BUYSELLSWITCH=1; // this is just a temporary manual switch. We will replace it later for the indicator. 1 means BUY, -1 means SELL. 0 means close all open orders per FIFO and monitor for new signal. When testing, this would be set to 1 and the EA would start Buying right away. When set to -1 it would start selling right away. When set to 0, it would close all open orders right away and then do nothing as it waits for the variable to change. To test the 0 condition, manually open several trades before starting the EA. 

input double      First_Lot= 0.01; // This is the first order that starts the process. 

input double      BrokerviewTP=600     // TP set in the order for the broker to see. These values are the same for all orders in the system, relative to each order. For safety. They will never be hit, unless my server goes down

input double      BrokerViewSL=1000     // SL set in the order for the broker to see.  These values are the same for all orders in the system, relative to each order. For safety. They will never be hit, unless my server goes down

input string      Grid_Map = "120/0.02/150/300 130/0.03/100/200 140/0.04/50/100 150/0.05/40/90 160/0.06/30/80";  //convert string to array. 

The four values for each item provide: points from previous order to add a new order, lot size of new order, TP for ALL open trades relative to the first lot (invisible to broker), SL for ALL open trades relative to the first lot (invisible to broker) 

This way, I have full control of the TP and SL points, relative to the First_Lot price, and they change according to the array each time a new order is added.  At every tick, the EA needs to check the BUYSELLSWITCH for a 0 condition to close all open trades in FIFO order.  When there are no open orders,  at every tick, the EA needs to check the BUYSELLSWITCH for a 1 or -1 condition to open the First_Lot. 


input int         BrokerviewTP=600;

input int         BrokerViewSL=1000;

input int         Slippage = 30;

input double      First_Lot= 0.01;

input double First_Lot_TP points=200     

input double First_Lot_SL points=400    

input string      Grid_Map = "120/0.02/150/300 130/0.03/100/200 140/0.04/50/100 150/0.05/40/90 160/0.06/30/80"; 

ALL close prices would be calculated relative to the original First_Lot_order_price, and readjusted according to the array.

Example:  Ea opens a Buy order of 0.01 Lots at 1.1800.  The order is set to TP at 300 points and SL at 1200 points (broker visible).

The Ea will set close_profit_price = First_Lot_order_price + 200.  Ea will set close_loss_price = First_Lot_order_price - 400

Then if price moves down 120 points, EA will open the next 0.02 order, and set close_profit_price = First_Lot_order_price + 150.  Ea will set close_loss_price = First_Lot_order_price - 300

Then if price moves down 130 points, EA will open the next 0.03 order, and set close_profit_price = First_Lot_order_price + 100.  Ea will set close_loss_price = First_Lot_order_price - 200

Then if price moves down 140 points, EA will open the next 0.04 order, and set close_profit_price = First_Lot_order_price + 50.  Ea will set close_loss_price = First_Lot_order_price - 100

Then if price moves down 150 points, EA will open the next 0.05 order, and set close_profit_price = First_Lot_order_price + 40.  Ea will set close_loss_price = First_Lot_order_price - 90

Then if price moves down 160 points, EA will open the next 0.06 order, and set close_profit_price = First_Lot_order_price + 30.  Ea will set close_loss_price = First_Lot_order_price - 80

These would all be invisible to the broker, because all he will ever see is the Take_Profit and Stop_Loss marks on each trade which will only get hit if EA is shut down due to power failure, or setting grid values higher than the broker visible SL and TP (which would be a user error, not an EA mistake)




How much will you charge me for this much work?

In part 2, which I will pay for separately, we will replace the BUYSELLSWITCH with an external indicator.  This way, I can use this EA to run from any kind of indicator I choose. 


Here is the sample code of this portion from the ProperBot (it is only 2 levels in the array, though...we need 4)


void init()

  {

   gi_Slippage=Slippage;

   gs_Symbol=_Symbol;


// Points to prices:

   gd_One_Pip_Ratio=MathPow(10,Digits);

   gd_TP = Take_Profit / gd_One_Pip_Ratio;

   gd_SL = Stop_Loss / gd_One_Pip_Ratio;

   gd_Stop_Level=MarketInfo(gs_Symbol,MODE_STOPLEVEL)/gd_One_Pip_Ratio;


// Strings to double:

   string sa_Grid_Levels[];

   double da_Grid_Level[2];                                        //Would you change this to a 4?????

   String_To_Array(Grid_Map,sa_Grid_Levels," ");

   int i_Grid_Level=ArraySize(sa_Grid_Levels);

   ArrayResize(gd_Distances_Map,i_Grid_Level);

   ArrayResize(gd_Lots_Map,i_Grid_Level);

   gi_Last_Index=i_Grid_Level-1;

   while(i_Grid_Level>0)

     {

      i_Grid_Level--;

      String_To_Double_Array(sa_Grid_Levels[i_Grid_Level],da_Grid_Level,"/");

      gd_Distances_Map[i_Grid_Level]=da_Grid_Level[0]/gd_One_Pip_Ratio;

      gd_Lots_Map[i_Grid_Level]=da_Grid_Level[1];

      Print(i_Grid_Level, ": ", gd_Distances_Map[i_Grid_Level], " / ", gd_Lots_Map[i_Grid_Level]);

     }


   gi_Connect_Wait*=1000;

   gi_Second_From=3600*Start_Hour+60*Start_Minute;

   gi_Second_To=3600*Finish_Hour+60*Finish_Minute;

  }

Con risposta

1
Sviluppatore 1
Valutazioni
(620)
Progetti
680
57%
Arbitraggio
25
16% / 60%
In ritardo
228
34%
Gratuito
2
Sviluppatore 2
Valutazioni
(28)
Progetti
47
23%
Arbitraggio
13
31% / 15%
In ritardo
12
26%
Gratuito
Ordini simili
Personnal programmer 30 - 31 USD
Hey there! I’m looking for a talented NinjaTrader programmer to partner with on some exciting projects. If you have a knack for NinjaScript and a passion for trading tech, let’s team up! What You Can Expect: A friendly collaboration on diverse projects Fair pay—50/50 split on all earnings An opportunity to dive deep into innovative trading strategies What I’m Hoping You Bring: Experience with NinjaTrader and
MT5 中运行的 EA 的主要任务 : 1 EA 将同时选择两对货币进行交易,包括 AUDUSD 、 EURUSD 、 GBPUSD 、 NZDUSD 、 USDCAD 、 USDCHF 、 USDJPY 、 AUDJPY 、 EURAUD 、 EURJPY 、 GBPJPY 、 GBPNZD 和 GBPCHF ,默认设置 GBPUSD 、 EURAUD 。 2 蜡烛图 的时间 区间 包括 15M 、 30M 、 1H 、 2H 、 4H 或 1D 。对于两对货币中的 每一对而言, 将同时密切观察两个 时间区间图。 也就是说,两对 货币 同时 打开 四个窗口,每对默认设置 15M 和 4H 。 如果 您 不肯定如何 为同一货币对打开两个窗口,请不要考虑接受这项工作 。 3 将使用自主开发的指标 CMA 结合 CCI 预测走势。 在某些特殊情况下 ,将使用 马丁格尔策略进行操作。因此,如果您已经拥有基于 Martingale
Required to develop expert advisory which will work on any pair including crypto , forex, gold, silver, oil, simple stragy which will work on RSI,GRID, take profit, grid distance, start and stop button, only buy and only sell, filter for time frame Like 5m to 4 hr. stop loss and take profit .Detail will be shared once you except order
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
Hi Guys, I am looking to someone that can generate an indicator for MT4 as explained below. Basically I would need that the indicator point out the price that will close my position in stop out/margin call. The indicator should pick automatically the level of trade out for the broker (which can be different from a broker to another broker) It should write (ideally on the bottom on the left) the following information
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown

Informazioni sul progetto

Budget
30 - 80 USD
Per lo sviluppatore
27 - 72 USD
Scadenze
da 3 a 10 giorno(i)