MQL4 and MetaTrader 4 - page 372

Each time I use FileWrite() in TXT or CSV files it appends the file starting from a new line. However, I need it to write data into the same line, so that Excel imports data into the same row. Each line will hold more than 256 characters, so I cannot use temporary string variables. Please let me...
Hi, i use tickdata with tickstory. i have noticed that with the same ea when i backtest with every tick it is running fast. And after a while its running very slow. Than i download again new data and use same ea. Backtest is fast and after 3-4 of the same tests it will go slow. So i noticed that...
Hi Guys  I had a question and was wondering if someone can help. I want an EA developed and two people have had similar jobs completed on MT4 freelance job posting area. I dont know my way around this website at all. The comments that the job poster have left seem to suggest that they are happy with...
The book says: The example below closes all sell orders currently opened by an expert advisor: I think I understand most of this code, but the: OrdersTotal() - 1 I don't get. Why - 1? Thanks. for(int order = 0; order <= OrdersTotal() - 1; order++){  bool selected = OrderSelect(order,...
Please help guys. Why all EAs stopped working on this latest MT4? Anything to do or convert inside EAs? Or any latest compiler? Please help
Hi, Mi EA works opening one Sell and one Buy orders at the same time, and when one of those are closed by TP or SL then it opens another Sell and Buy orders. What i want to do is avoid EA to open an order if same is already openned. I attach the EA for you to help, im really new on this. THANKS!!!
i recently bought an indicator <product name removed> and it was working fine for a few weeks. Then right after a windows update it wouldn't load the indicator anymore in met4. I've deleted the indicator from met4 and tried to download it again but its not downloading it. Any ideas?
Guys: I use the optimization in the tester to do some reserch of my stargegy. I set one parameter to vary from 0.1 to 2.0, so there should be 20 results. But the testor only show 11 of them, which is profitable. or "significant"...... How can i see the other 9??? By the way, simplely lable
I created a basic EA - buy the up bar. Loaded it, compiled, and clicked Optimize. The Expert Properties Inputs were Value 5.0; Start 5.0; Step 5.0; Stop 100.0 AUDUSD H1; spread 10 Period selected was previous 12 months. Without the Optimization I should have seen profits, except I have negative net...
I need a developer to create a position sizer for my traders. It should work as it works on website regarding calculations but it has to work on chart by moving a line on chart
int totalorder(int m){   int total=0;   for(int i=0; i<OrdersTotal(); i++)   {      if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES))continue;      if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=MagicNumber || OrderType()!= m) continue;      total++;   }   return(total);}double open(int m){   for (i...
Hi All, I am currently try to se Brief desciption of the issue:  - I have a grid of orders. Each orders has its own Take Profit and Stop Loss level. - I want all orders (active or pending) of the grid to be closed or deleted when the price reaches a certain % difference from the price at which is...
Hi guys, I have problem in my code and I can't find the solution. description of my code is:      1 - use auto lot size: Auto Lot Size = NormalizeDouble(AccountBalance() * Risk / 100 * AccountLeverage() / contract, LotDigits); first order on entire history : use Auto Lot Size if order...
HI guys, I can display the default fib on charts no problem but if I want a custom set of levels I run into problems. I read the documentation here https://docs.mql4.com/constants/objectconstants/enum_object/obj_fibo which shows the code but doesn't actually use it in the example! Can anybody offer...
Hi all, Starting to play around with custom indicators more and I've hit a roadblock with the divide issue. I'm calculating the spread difference between a synthetic price and its underlying (dividing the close price of 2 pairs less the underlying currency pair) which is then displayed as a moving...
Regarding indicators and time frames in the code. https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes EI: imomentum https://www.mql5.com/en/docs/indicators/imomentum Question: Where noted and regarding the time frames. What is expected to happen when you select a static...
Hi. I want to build a Basic Parabolic SAR EA and after I write the code and start a backtest, it doesn't work the way it should, or better to say the way i want it to do. Well i want to open a new trade at the reverse point and also close the last trade too. here's my code: void OnTick()  {...
When publishing a product it is not allowed to attach any external file with it as i know...but if my product in need of some audio and bitmap images files then how to publish it??
Please can somebody help me go through this code and find out why its having multiple entry, if a sell condition is true it keeps entering multiple sells, the same with buy...
[Deleted]
  pending order modify  (14   1 2)
Hey guys, I have a problem with my pending order modify. Has anyone of you an idea? When I add this to a chart there is no modifying taking place and no error message given out. Whats wrong here? Cheers Fabian {RefreshRates();double ppoint=MarketInfo(OrderSymbol(), MODE_POINT); int...
Hi guys, pretty difficult to explain in a headline. I have this function: double ClosePrice(string symbol, int timeframe, int position) {   return   iClose(symbol, timeframe, position);} And I call this function like this: double price = ClosePrice("EURUSD", PERIOD_H1, 10); Now I want to define the...
Hi guys, Any one can fix this FR-ReversalPoints Indicator, Reversal Dots appears after some candles formed.  please fix it.
I am just starting to learn coding. So, I tried modify a code I found on FF site, I am stuck - I don't know how to get this done smoothly. I actually wanted the EA to always use total lotsize of loosing trade to open the next trade. For example, if there are 0.01, 0.02, 0.03, 0.04 lots of four...
Hi, I want to display horizontal and trend lines description on chart, is it can be done ?
I was testing my EA with the build in Strategy Tester from MetaTreader 4. I recognized that my EA placed far too few orders because of missed trend signs. After checking the chart by my own, I realized that my EA processed the Tenken-sen wrong. Therefore I printed the retrieved Tenken-sen values...
[Deleted]
Ok so I grabbed this code from another post on this forum, which works great for closing multiple open trades based on FIFO rules. However when there is just 1 open trade to close, it's not closing. What do I need to change to fix this but not break the FIFO capability? void CloseOrders(int slippage...
[Deleted]
Hi All, back again to nag you. :-) Would anyone have a handy-dandy little MQL4 function that automatically calculates lot size (for any symbol) based on how much % risk of my available equity, and my desired stoploss size in pips? Thanks! Shawn
Hello Developers, I need your help to solve a peculiar case. My problem happens when sending TP and SL for orders. EA seeks TP of only 10 points. However when opening orders this distance is not being respected. For example, if I open a buy order by placing a 10-point...
Whats the maximum amount of charts I can have up on the metatrader terminal 4?
do you make a request to change your leverage when u havae money in your account or before that? because i always request to change my leverage but my balance stays the same i dont have any more money added to my account can someone explain me in details what to do step by step! thx in advance 👏🏾