New function profit counting and closing

Tarea técnica


I would like to have a new function in my EA.

later i will upload the EA for Integration in the EA


New Funktion:

 

extern …….   useBasketprofitpct_Low_high=true;          //new function

extern …….. basketprofitpct_Low_high=2;                         //new function

 

If „extern bool   useBasketprofitpct_Low_high=true;“
„extern ……. basketprofitpct_Low_high=2; „

>>count-profit-closed-buy-position (like „extern bool   useBasketprofitpct=true;“ but only the buy-posistions)
>>count-profit-open-buy-posistions
>>count-profit-of-the-lowest-open-sell-position
>>if (profit-closed-buy-positions (similar like „useBasketprofitpct“) + profit-open-buy-posistions + profit-of-the-lowest-open-sell-posistion >=basketprofitpct_low_high*0.01*AccountBalance()
                then close all open buy-posistions and the lowest-open-sell-position

 

>>count-profit-closed-sell-position (like „extern bool   useBasketprofitpct=true;“ but only the sell-posistions)
>>count-profit-open-sell-posistions
>>count-profit-of-the-highest-open-buy-position
>>if (profit-closed-sell-positions (similar like „useBasketprofitpct“) + profit-open-sell-posistions + profit-of-the-highest-open-buy-posistion >=basketprofitpct_low_high*0.01*AccountBalance()
                then close all open sell-posistions and the highest-open-buy-position

 

 


 

 

Function in the EA: „useBasketprofitpct“

 

   if(useBasketprofitpct)

     {

      if(basketpercentflag=="CLOSE")if(countall(1)==0)basketpercentflag="";

      if(countprofit(1)>=nd(basketprofitpct*0.01*AccountBalance(),2) || countprofit(1)<=-1*nd(basketlosspct*0.01*AccountBalance(),2)) basketpercentflag="CLOSE";

      if(basketpercentflag=="CLOSE")

        {

         close(OP_BUY);close(OP_SELL);deletes(7);deletes(8);

         timex=TimeCurrent();

        }

      //Comment("\nprofit = "+DoubleToStr(countprofit(1),2));

     }

 

>>>>>>>/// i wanna the same just only for the buy and the sell-posistions and adding the lowestsellposion and hightestbuyposistion!

 



Han respondido

1
Desarrollador 1
Evaluación
(365)
Proyectos
507
40%
Arbitraje
147
18% / 72%
Caducado
99
20%
Trabajando
2
Desarrollador 2
Evaluación
(298)
Proyectos
427
26%
Arbitraje
18
61% / 33%
Caducado
26
6%
Libre
Ha publicado: 8 ejemplos
3
Desarrollador 3
Evaluación
(53)
Proyectos
79
18%
Arbitraje
13
15% / 54%
Caducado
5
6%
Libre
4
Desarrollador 4
Evaluación
(258)
Proyectos
395
28%
Arbitraje
69
19% / 49%
Caducado
120
30%
Libre
Solicitudes similares
Hi there, I am here as a representative of my team looking for a very reliable to have clear look at my HFT trading strategy including references of exactly what the final product should look like, we also have a detailed specifications in place which we'll be sharing only with an experience certified top level developer, I mean he/she must be well skilled and knowledgeable in various programming language with the
Hi programers, I'd like to know if you can program or help me purchase a bot for Metatrader. I need a profitable strategy for BTCUSD and one that connects to the XM broker. I'm looking for a bot that places between 4 and 8 trades daily
As the title says. I'm looking for an experienced developer to improve and optimize an existing code created to pass a Prop Firm evaluation. I will only accept someone who believes can do it. The deliver job should be a clean code and optimized in order to meet the goal of it. If not - the job will be cancel with your consent or you can keep trying until you deliver what I'm looking for. So, read this lines carefully
Reverse engineering EA 30 - 100 USD
Hello all programmers, I need reverse engineering EA, unfortunately I have only .exe5 file so based on historical data you need to create a source of code or maybe you know another way
Hi i wanted to see what you will charge me to make a simple indicator in TOS which i can plot on my activity and positions section. Firstly I want a custom column where we can calculate the difference between the trade price and the current price of a stock, or future or option. so we we have the value in that column. Example NVDA - Trade price 140 - Mark is 190 so this new colum will show +50 and option we bought at
I want a scalping MT5 trading bot that will be placing trades without any signal indicator. Conditions will be as follows; it will be opening both buy stop and sell stop at the same time being separated by a gap of 20 points from the entry. If for instance a buy stop is hit, then the sell stop should be closed immediately, and a stop loss is placed immediately where the sell stop was. Ones the buying position gets
Looking to create a bot trading forex, stock or crypto. (Very flexible) Just need to show me how it's a winning track record with real past results to show, if you have a winning profitable strategy/bot please reach out
Charity EA 30 - 35 USD
REQUIREMENTS SPECIFICATION Using the 1-hour chart, draw a Horizontal Line at the opening price of the given candle and another Horizontal Line at the closing price of the same candle, then drop to 5-minutes chart and wait for the first candle to close. ENTRY CONDITION ONE: If that first 5-minute candle closes above the Upper Horizontal Line, enter a Buy trade. If it closes below the Lower Horizontal Line, enter a
I would like to have an Expert Advisor created with the following parameters. This Expert Advisor should analyze the higher time frame and the medium time frame, and based on that, open positions on the lower time frame. For this reason, I would like to work with developers who have experience in multi-timeframe analysis. I have a PDF file that explains the entire trading logic. In addition, I have compressed the
I'm interested in acquiring a reliable, consistently profitable Expert Advisor (EA) for MetaTrader 5 (MT5). The EA should be thoroughly tested both through historical backtesting and real-time live trading and built on a transparent, logical strategy rather than being a black box. I'm open to different types of trading approaches, provided they are stable, well-explained, and have demonstrated consistent performance

Información sobre el proyecto

Presupuesto
20 - 30 USD
Para el ejecutor
18 - 27 USD
Plazo límite de ejecución
de 2 a 3 día(s)