MQL4 and MetaTrader 4 - page 278

Hey guys, Does anybody have a function that increases the lot size by a certain amount when the account balance increases by a certain amount. Eg. If the account is initially on $2000 I want it to trade on 0.2 and when the account balance reaches $3000 it must start trading at 0.3 etc. Thanks! 
for ( int i=pos; i>= 0 ;i--) { if (RSI_current_peak[i] != EMPTY_VALUE ) { int count = 0 ; for ( int k = i+ 4 ; k <= pos; k++ ) { if (RSI_current_peak[k] == EMPTY_VALUE ) { count = count+ 1 ;
This program actually copies and pasts vertical lines as intended but original date is different from paste date by up to 10 seconds. Why is that? Thanks in advance. int OnInit () { ChartSetInteger ( 0 , CHART_EVENT_OBJECT_CREATE , 1 ); return ( INIT_SUCCEEDED ); } void OnChartEvent ( const
hi everyone i have a custom inidcator as you see here it totaly works fine in live chart or tester but when i call it with iCustom it dosen't work right and always show the empty value 2147483647.0 the ea is very simple just calling the dType value from custom indicator and if it was 1 a buy will be
Hi I wanted to programmatically check in MQL4 if I have upward trend or downward trend which is 1 set of higher high and higher low (long) and 1 set of lower high and lower low. I tried to use zigzag indicator but cannot dynamically get values of the tips of the lines. Ideally I want to store values
  Adaptive digital filters  (401   1 2 3 4 5 ... 40 41)
Many people now use the JMA and its modifications, but there is almost no mention of the specific theoretical assumptions on which it works. If anyone knows, please share
Hello and sorry for my english. I want to add a pointer to an EA and I need to add code to access the pointer buffer. I include the indicator below //+------------------------------------------------------------------ //| //+------------------------------------------------------------------
hi every one I want to define an extern parameter in an EA and I want put some value on it like: 1 1.1 1.2 1.3 , .... that user can select one of them from DropDownList how I can do it? Best Regards Neda
Hi, I coded a custom indicator, it works fine until new candle opens, after that indicator stops history drawing what's wrong with it??? thanks #property strict #property indicator_chart_window #property indicator_buffers 1 #property indicator_label1 "Slow" #property indicator_color1 Gold #property
Hi everyone, I am a beginner in Mql4 programming. I am creating an EA that can track trades closed by Stop loss or Take profit and use that information to further process the EA for the current trade session. I am thinking of doing this by tracking changes in account balance using AccountBalance()
hi guys i read this part https://docs.mql4.com/files and i try to read a file i use this code for do that but nothing i tryed in all mode possible i think, but probably escape somthing i try also insert relative path directly but noting , how is possible ? string nameFile= "forexsymbol.csv" ;
[Deleted]
Hey there! Something that should be straight forward is giving me an butt-pain. I am trying to make the simplest combobox option with switchable items. And succeeded until it comes to the OnEvent part. So here is my code: #property copyright "me" #property version "1.00" #property strict #property
I want to look at a chart at a given timeframe. Say, H1. And I want to have a Stochastic indicator beneath it, in its own window. It comes bundled with MT4 so I just have to drag and drop it. Now, I also want to have another Stochastic indicator in its own window, for a different timeframe. Say
Hey guys, can someone assist me with moving where my Session indicator displays the session's name and pip count? I'd like the info to be displayed on-top of the frame instead of within the frame. Depending on the candlestick formations at session open, the info sometimes gets obstructed and
I've been writing quite a few EAs and I decided that I wanted to see the output of them in a "scrolling" fashion on the left side of the chart. So, I wrote this little function and I thought I'd share it.  Basically, you call the function by sending a new comment string. That will be output at the...
hi... i have encountered some array out of range error. i tried to figure out where is problem but it difficult figure out . here is part of source code i can see array out of range error happened in this line. if anyone enlighten me much appreciate! for (counter = i; counter <= i + 2 ;
I have been looking at some forums on cases relating to Developers being banned after violating some rules. I believe that if a person has taken there time to learn Metaquotes Language it means they are serious on working on this plartform. However they may make mistakes while they are still
Somebody can help me to find a EA , with ea i can order on Channel Telegram to trade on MT4 and send Signal to an other Channel Telegram
Hello Everyone, I am new to MT4. I want to know whether can we change / Add the source of RSI to VWAP
Hi, I'm in the process of translating a TradingView strategy to MQL4 to run as an EA and see if it's actually profitable. I've written all of the 'skeleton' of the EA, ie. inputs, risk management, position entries, trailing stop etc. There's just 1 of the entry criteria I'm struggling to translate
Hi everyone, I am a beginner in Mql4 programming. I am creating an EA that can track closed trades based on Stop loss or Take profit and use that information to further process the EA for the current trade session. I am thinking of doing this noting the AccountBalance() at the beginning of the
Hi, I'm currently situated in Adelaide, but the Forex scene is pretty quiet and also I'm having trouble finding people with programming skills. If there's anyone here from Adelaide or Melbourne Australia I wouldn't mind hearing from you. Cheers
what will happen when equity goes to zero ? Balance is 7k+ Positions are hedged. Note: Margin Level is not displayed/not shown by MT4 apps because BUY and SELL lots are equal (hedged) Note: Many other positions are not shown on screenshot
Hi there guys. Does anyone know the algorithm used by the strategy tester in MT4 to simulate ticks based on price bar data? Regards
hi guys i try to write text under or up a candel i try with this code but write in left up corner o_O ObjectCreate ( "Demade" , OBJ_LABEL , 0 , Time[ 0 ], (Low[ 0 ])); ObjectSetString ( 0 , "Demade" , OBJPROP_TEXT , "GAOGA" ); ObjectSetString ( 0 , "Demade" , OBJPROP_FONT , "Arial"
Hello Everyone. I'm new in coding. I'm trying to set up an EA. even if it seems to make good profit when I check the journal I get error 4108. And the screen is full of orders and modified orders as I use a trailing stop. Can someone help me with this issue? I will attach the code in the forum so
hi everyone i have an custom indicator with lot of graphic object whenever i'm suing it in script with iCustom all graphic object appear in the chart i want to know how to prevent this custom indicator object appear in chart thank you
Can't figure out if strategy tester as well as optimization is considering margin requirements for lots and considering it as draw-down against the equity? Seems like it should however leverage is never specified in the test unless you are using tick data from a reputable source which then would...
I am struggling to understand why all of a sudden my strategy tester wont run on the particular settings i am using. I am getting the error "not enough money" however my leverage is 1:500 and to open 1 lot it requires £200. on a 500GBP account i should be able to open 2 lots at a time leaving 100GBP
Hi! This weird thing keeps happening to me while trading and I cant get rid of it. It displays the candles totally wrong, today I logged in a demo account just to show you this. Maybe one of you went through this on your mt4 account and can help me. So basically, look at my profit in the bottom