Grid Management by Array

MQL4 专家 外汇

工作已完成

执行时间5 天
客户反馈
Excellent work!! Very fast and good communication. Will use again!
员工反馈
good customer

指定

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;

  }

反馈

1
开发者 1
等级
(620)
项目
680
57%
仲裁
25
16% / 60%
逾期
228
34%
空闲
2
开发者 2
等级
(28)
项目
47
23%
仲裁
13
31% / 15%
逾期
12
26%
空闲
相似订单
I want to decompile an ea file and get the source code, i need it really quick as fast as possible. the file must be delivered alongside the source code
Dear Developers, I would have a very simple request. I have a ML model developed in Python for EURUSD daily trading. I would like to backtest it in Meta Trader 5 using the Strategy Tester tool. For that I would need an Expert Advisor program. The input would be a csv file that contains two columns: - dates (going back for a few years on a daily basis) - trading signal (it can have only 2 values, either 1: Buy, or -1
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader 1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA
1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and Trailing Draw Down options need to be implemented 5. Risk needs to be in % of
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
This is not an EA that actually opens/closes trades. Instead this project involves creating a dashboard where the user can create a grid trade scenario with initial entry and scale trade pip distances, lot sizes for each trade, and draw down amount. It then calculates the break-even + profit level where all trades would close. For each new scale trade the BE+ point is recalculated which is then displayed on the
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader, I wanted this indicator in NT bcs I chart in NT, and if the indicator could also have been an automated strategy even better. Please confirm that it will be an indicator and Automated Trading Strategy

项目信息

预算
30 - 80 USD
开发人员
27 - 72 USD
截止日期
 3  10 天