• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 8:08pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 8:08pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Coding robots and indicators in C# for no charge (cTrader API) 182 replies

Oanda MT4 - Indicators and EAs not showing 1 reply

EAs and indicators relating to moutaki... 22 replies

InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply

Need help to code EAs for MT4 and MT5 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe

I will code your EAs and Indicators for no charge

  • Last Post
  •  
  • 1 22172218Page 221922202221 2268
  • 1 Page 2219 2268
  •  
  • Post #44,361
  • Quote
  • Mar 2, 2021 5:18pm Mar 2, 2021 5:18pm
  •  BlackArt
  • | Joined Feb 2021 | Status: Member | 29 Posts
Quoting RoninTheory
Disliked
{quote}... forgive my meddling just trying to help good luck
Ignored
no no, it's fine . I'll ask him. thx for the advice.
But in the meantime, if someone know how to do it please let me know. Based on the scripts that I've attached in my previous post it doesn't look like a complicated code. Or maybe I'm wrong ... I spend good few houres yesterday to do it by my self and we know the result of it.
However I don't understand a word of that code

P.S.
Well... his PM is disabled, so it's gonna be hard to get in touch with him
< I collect pips to afford a Starship ride >
1
  • Post #44,362
  • Quote
  • Mar 2, 2021 5:27pm Mar 2, 2021 5:27pm
  •  danjuma
  • | Joined Feb 2010 | Status: Member | 542 Posts
So, I am trying to code an EA to test a strategy in strategy tester, which basically involves trading round numbers. I have been able to put together a working EA (through trial and error and copy and pasting snippets of codes here and there from other EAs. I am not a proficient mql coder by any means) that can trade at round numbers at every 100 pips. However, I want to make it to trade at every 200 pips and I have been finding it difficult to come up with a workable EA. Anyways, I decided to try a very crude method (basically hard-coding the round numbers at 200 pips as all I want to do right now is just to test the EA/strategy on one pair for a short period just to see whether it has any legs). So, below is the bit of the code I created which unfortunately is not working properly. For example, at a price of 1.2275 for GBPUSD back in Sep 2019, instead of the EA opening a buy stop at 1.24 and a sell stop at 1.22, it instead opened a buy stop at 1.24 (correct) but then a sell stop at 1.16! I am kind of baffled as the logic seems to make sense to me, but obviously it is wrong and I am missing something. Would be grateful if someone could point out what I have done wrong. Many thanks!

Inserted Code
void OnTick()
  {
 
  int NrOfDigits = MarketInfo(Symbol(),MODE_DIGITS);   // Nr. of decimals used by Symbol
   int PipAdjust;                                       // Pips multiplier for value adjustment
      if(NrOfDigits == 5 || NrOfDigits == 3)            // If decimals = 5 or 3
         PipAdjust = 10;                                // Multiply pips by 10
         else
      if(NrOfDigits == 4 || NrOfDigits == 2)            // If digits = 4 or 3 (normal)
         PipAdjust = 1;           
//---- 
  
   double nTickValue=MarketInfo(Symbol(),MODE_TICKVALUE);   //value of a tick
   if(Digits==3 || Digits==5){       //If the digits are 3 or 5 we normalize multiplying by 10
      nTickValue=nTickValue*10;
      }
  
   int slippage = Slippage * PipAdjust;
  
 
   double buy_price;
   double sell_price;
   double mid_price = (Ask + Bid) / 2;
  
 
   if(mid_price < 1.38 && mid_price > 1.36)buy_price = 1.38; sell_price = 1.36;
   if(mid_price < 1.36 && mid_price > 1.34) buy_price = 1.36; sell_price = 1.34;
   if(mid_price < 1.34 && mid_price > 1.32) buy_price = 1.34; sell_price = 1.32;
   if(mid_price < 1.32 && mid_price > 1.30) buy_price = 1.32; sell_price = 1.30;
   if(mid_price < 1.30 && mid_price > 1.28) buy_price = 1.30; sell_price = 1.28;
   if(mid_price < 1.28 && mid_price > 1.26) buy_price = 1.28; sell_price = 1.26;
   if(mid_price < 1.26 && mid_price > 1.24) buy_price = 1.26; sell_price = 1.24;
   if(mid_price < 1.24 && mid_price > 1.22) buy_price = 1.24; sell_price = 1.22;
   if(mid_price < 1.22 && mid_price > 1.20) buy_price = 1.22; sell_price = 1.20;
   if(mid_price < 1.20 && mid_price > 1.18) buy_price = 1.20; sell_price = 1.18;
   if(mid_price < 1.18 && mid_price > 1.16) buy_price = 1.18; sell_price = 1.16;
  • Post #44,363
  • Quote
  • Mar 2, 2021 5:35pm Mar 2, 2021 5:35pm
  •  RoninTheory
  • Joined Apr 2020 | Status: bit of a knoob.... | 714 Posts | Invisible
Quoting BlackArt
Disliked
{quote} no no, it's fine . I'll ask him. thx for the advice. But in the meantime, if someone know how to do it please let me know. Based on the scripts that I've attached in my previous post it doesn't look like a complicated code. Or maybe I'm wrong ... I spend good few houres yesterday to do it by my self and we know the result of it. However I don't understand a word of that code P.S. Well... his PM is disabled, so it's gonna be hard to get in touch with him
Ignored
i quoted him thanking him for kind explanatory post and he responded- go one or two ways ither get response or not

one thing i can guarantee don't try never know

good luck
Attached Image (click to enlarge)
Click to Enlarge

Name: 9051d7c19435f61a3fe6e9d424eb7b37.png
Size: 124 KB
2
  • Post #44,364
  • Quote
  • Mar 2, 2021 10:07pm Mar 2, 2021 10:07pm
  •  walvekarraje
  • | Joined Feb 2019 | Status: Member | 41 Posts
Quoting jeanlouie
Disliked
{quote} Pic is 1-false, 3-false, to see just 2, looks correct. Go through each signal live or in the tester and see how they print signals. {image}
Ignored
1= false, 3= false, 2=true
i get a error message "no indicators are being used"

after that the chart shows exactly opposite signals....the red circle below candle is a sell signal where as your arrow shows a buy.... the green circle above candle is a buy signal but your arrow shows a sell. same is true in the pic you have posted.

i am very thankful for your help

Attached Image (click to enlarge)
Click to Enlarge

Name: ac2418e869cd76cdcc99fbcec73ab83b.png
Size: 114 KB
  • Post #44,365
  • Quote
  • Edited at 11:47pm Mar 2, 2021 11:08pm | Edited at 11:47pm
  •  classy
  • Joined Jun 2012 | Status: Trader , Analyst and Mentor | 4,223 Posts | Online Now
Quoting jeanlouie
Disliked
{quote} Trendline_Straights_Horizontal_Vertical - makes either 1 line, H or V, or puts a panel for multiple lines - color, width, style for lines, HnV separately - ray to the right or down, or reverse ray - can drag the H lines around and they'll always straighten out in price - can drag the V lines around and they'll always straighten out in time {image} {image} {file}
Ignored
hi jean would you please consider same option for rectangle box filled /unfiled (draw object back ground on/off) and show as all toolbox on chart straight trendline and rectanglebox please.

i use 2 indicator if possible combine any coder in one toolbox please.(atached image
Attached Images (click to enlarge)
Click to Enlarge

Name: rect1 2.png
Size: 52 KB Click to Enlarge

Name: rect1.png
Size: 47 KB
Attached Files
File Type: ex4 WT_Lineas_v2.5.ex4   131 KB | 84 downloads
File Type: ex4 Trendline_Straights_Horizontal_Vertical.ex4   23 KB | 88 downloads
Say something meaningful or Silence!!
  • Post #44,366
  • Quote
  • Mar 3, 2021 12:05am Mar 3, 2021 12:05am
  •  BitcoinBoff
  • | Joined Aug 2019 | Status: Member | 264 Posts
Quoting mntiwana
Disliked
{quote} Decompiled codes are so easy to know,it using unusual and strange variables that never used by any coder but by decompiler softwares,like these --------------------------------------------- double G_ibuf_92[]; double G_ibuf_96[]; double G_ibuf_100[]; double G_ibuf_104[]; double G_ibuf_108[]; double G_ibuf_112[]; double G_ibuf_116[]; double Gda_120[20][20]; double Gda_124[20]; double Gda_128[20]; double Gda_132[20]; int Gi_136; int Gi_140; int Gi_144; int Gi_148; int Gi_152; int Gi_156; int Gi_160; double Gd_164; double Gd_172; double Gd_180;...
Ignored


Thank you for that thorough explanation.

Now a lot of things make sense.

The good heart of good people will always be exploited by the bad apples in this world, no matter what field you are in...sad

I myself has asked here in public for source code of some indicators, just because you guys helping us needs it, now I see that can be sword with two edges, one ugly, and one beautiful

But I believe good will conquer the bad, always.

Thank you for your passion
  • Post #44,367
  • Quote
  • Mar 3, 2021 2:41am Mar 3, 2021 2:41am
  •  bred
  • | Joined Jan 2016 | Status: Member | 55 Posts
Hi Coder,

Any one could help to add on cross currency alert for "CCFp_v1.0.3cvert_mod_netsrac"?
Attached Image
Attached Files
File Type: mq4 CCFp mtf alerts 2.07 nmc.mq4   32 KB | 57 downloads
File Type: mq4 CCFp_v1.0.3cvert_mod_netsrac.mq4   25 KB | 52 downloads
  • Post #44,368
  • Quote
  • Mar 3, 2021 2:47am Mar 3, 2021 2:47am
  •  Spudfan
  • | Joined Apr 2017 | Status: Member | 15 Posts
I'm hoping someone can code this indicator for me! (For MT4). I have searched for a long time and can't find something that matches what I want. It is a two-bar pullback alert indicator. It needs to define two MAs (I use those for trend direction) and as in the two cases highlighted in the screenshot, when one bar closes with both high and low, respectively, closer to the MAs than the previous bar, then that's a two-bar pullback. If a third bar joins them we can ignore the first one and highlight the most recent two. I need a pop-up alert mainly, but to make it useful to others, the usual sound and email push can be added.

I would be very grateful for some help with this.
Attached Image
  • Post #44,369
  • Quote
  • Mar 3, 2021 3:02am Mar 3, 2021 3:02am
  •  walvekarraje
  • | Joined Feb 2019 | Status: Member | 41 Posts
Quoting jeanlouie
Disliked
{quote} Pic is 1-false, 3-false, to see just 2, looks correct. Go through each signal live or in the tester and see how they print signals. {image}
Ignored
i just reversed the inputs of 2 and the alerter is working absolutely fine and generating perfect alerts as i wanted.
no words can express my gratitude sir. may god bless you and your family.
  • Post #44,370
  • Quote
  • Edited at 12:40pm Mar 3, 2021 3:15am | Edited at 12:40pm
  •  mer071898
  • Joined Jan 2007 | Status: Every new idea looks crazy at first | 1,673 Posts
I need to know if there is a way to modify this indicator so it will automatically place alerts when the attached Support Resistance MMM indicator draws an untested level? Once the price retraces to this zone, the alert will trigger either an alert on the chart, an email, or push notification. Again, I only need alerts for the untested levels. Any help will be greatly appreciated.

Attached Image (click to enlarge)
Click to Enlarge

Name: NAS100.png
Size: 74 KB
Attached File
File Type: mq4 Support Resistance MMM.mq4   26 KB | 131 downloads
  • Post #44,371
  • Quote
  • Mar 3, 2021 6:53am Mar 3, 2021 6:53am
  •  robbankssr
  • | Joined Feb 2021 | Status: Junior Member | 2 Posts
Quoting robbankssr
Disliked
Hello,i have a simple request if someone can code this candlesticks pattern finder on any tf In terms it's simple it needs to find a engulf candle right after a engulf candle,i will post below and example Thank you for time and help {image}
Ignored
Or at least how i can modify another engulf Finder indicator to Find it my way?
  • Post #44,372
  • Quote
  • Mar 3, 2021 7:03am Mar 3, 2021 7:03am
  •  eess
  • | Joined Feb 2021 | Status: Member | 23 Posts | Invisible
Quoting danjuma
Disliked
So, I am trying to code an EA to test a strategy in strategy tester, which basically involves trading round numbers. I have been able to put together a working EA (through trial and error and copy and pasting snippets of codes here and there from other EAs. I am not a proficient mql coder by any means) that can trade at round numbers at every 100 pips. However, I want to make it to trade at every 200 pips and I have been finding it difficult to come up with a workable EA. Anyways, I decided to try a very crude method (basically hard-coding the round...
Ignored

Try printing out the mid_price to the screen or console and also at each "if" statement to see which "if" loop it went into. And also if there are other parts of your code where you set the sell_price and buy_price, print them out as well. Then you will be able to figure out....
  • Post #44,373
  • Quote
  • Mar 3, 2021 9:12am Mar 3, 2021 9:12am
  •  Kelowkie
  • | Joined Jan 2016 | Status: Member | 98 Posts
Good day Coders,

Please help me with a line of code to produce horizontal lines between period separators?

Thanks
Elroy
Attached Image
  • Post #44,374
  • Quote
  • Edited at 11:31am Mar 3, 2021 9:34am | Edited at 11:31am
  •  Phylo
  • Joined Feb 2012 | Status: Member | 1,710 Posts
Quoting BlackArt
Disliked
Hello ! I'm looking for a script where you can choose X lot of the position size to close out. For example: If I have a 0.10 lot size open and I want to close 0.04 of the position the script would close that part and the remaining position would only be 0.06 lots. I kind of found similar scripts to what I'm looking for (attached) but I have no idea how to modify them to work my way. The One Click Partial Close Script do almost the trick, but it closes 1/3 of the open position every time. I tried to modify code by myself but I totally don't know...
Ignored
quick mod - short on time

Comment out ' // ' below code as shown for immediate execution.
Inserted Code
//#property show_inputs

Tip: It is not necessary to drag any script onto the chart - if the chart has focus/is the active chart just double click the script in the Navigator Panel and it will execute - this may or may not be more efficient for some than assigned hotkey execution.

For more complex order closing see below video -
Inserted Video
Attached File
File Type: mq4 close_positions_with_defined_lots_symbol mod - 1.mq4   1 KB | 68 downloads
Posts are not necessary intended for you
3
  • Post #44,375
  • Quote
  • Edited at 10:33am Mar 3, 2021 9:55am | Edited at 10:33am
  •  minoshuk
  • | Joined Nov 2020 | Status: Member | 8 Posts
Dear Respected Coders,

I humbly request your favor to help me adding push notification to this indicators; once the arrow appear it will send notification to mobile MT4.

Thanking you all in advance
Attached Image (click to enlarge)
Click to Enlarge

Name: zwuk MA.png
Size: 71 KB
Attached Files
File Type: ex4 zwuk MA.ex4   5 KB | 39 downloads
File Type: mq4 zwuk MA.mq4   6 KB | 80 downloads
  • Post #44,376
  • Quote
  • Edited at 11:35am Mar 3, 2021 11:24am | Edited at 11:35am
  •  jeanlouie
  • Joined Dec 2010 | Status: Member | 964 Posts
Quoting danjuma
Disliked
...For example, at a price of 1.2275...buy stop at 1.24 (correct) but then a sell stop at 1.16...
Ignored
Encapsulate all related operators after the if expression in {}. The way it is now, it's not considering the sellprice=xx as part of the if's, so all the sellprice=xx are being used, and the last one is sellprice=1.16, that's where 1.16 is coming from.

Also scrap all the if's, replace it with a single function to calc buy/sell prices. eg, if your increment for round numbers is 10, and some price is at 53, the buy is at 60, sell is at 50. Round down to an integer the quotient of price and increment and * by increment, 53/10=5, 5*10=50, thats the sell, add the increment, 50+10=60, thats the buy.
  • Post #44,377
  • Quote
  • Mar 3, 2021 11:32am Mar 3, 2021 11:32am
  •  jeanlouie
  • Joined Dec 2010 | Status: Member | 964 Posts
Quoting Kelowkie
Disliked
Good day Coders, Please help me with a line of code to produce horizontal lines between period separators? Thanks Elroy {image}
Ignored
There is no way to get the period separator time values, you have to calc these yourself. The separators also follow different rules based on tf, eg every day/week/month/year. Generally, as you loop through the chart, you're checking some time value of each candle and seeing if it's different from the previous candle, if it is, then it's a new time separator. The functions you'll need are from timeday and under, here https://docs.mql4.com/dateandtime. eg if you're on the 1hr chart and want daily separators, go through the chart and put a vline on every candle that has a timehour of 0, or the first candle that isnt the same day as the previous.
  • Post #44,378
  • Quote
  • Mar 3, 2021 11:45am Mar 3, 2021 11:45am
  •  jeanlouie
  • Joined Dec 2010 | Status: Member | 964 Posts
Quoting walvekarraje
Disliked
{quote} 1= false, 3= false, 2=true i get a error message "no indicators are being used" after that the chart shows exactly opposite signals....the red circle below candle is a sell signal where as your arrow shows a buy...
Ignored
- alert thing, yes that was a problem, addressed
- indicator 2 signals are reversed/right side up now
Attached File
File Type: ex4 Alerter_123.ex4   21 KB | 55 downloads
1
  • Post #44,379
  • Quote
  • Mar 3, 2021 12:28pm Mar 3, 2021 12:28pm
  •  danjuma
  • | Joined Feb 2010 | Status: Member | 542 Posts
Quoting jeanlouie
Disliked
{quote} Encapsulate all related operators after the if expression in {}. The way it is now, it's not considering the sellprice=xx as part of the if's, so all the sellprice=xx are being used, and the last one is sellprice=1.16, that's where 1.16 is coming from.
Ignored
Awesome! Thanks, it works!

Quote
Disliked
Also scrap all the if's, replace it with a single function to calc buy/sell prices. eg, if your increment for round numbers is 10, and some price is at 53, the buy is at 60, sell is at 50. Round down to an integer the quotient of price and increment and * by increment, 53/10=5, 5*10=50, thats the sell, add the increment, 50+10=60, thats the buy.

With regards to above, could you please explain further what you mean using something like GU price (example 1.29103). I tried something similar using a 'GetNextRoundNumbers' function for 100 pips round numbers I gleaned from another EA, but it did not work properly. Below is a snippet of the code I created that did not work, and the code for the 'GetNextRoundNumbers' function for reference. Thanks

Inserted Code
GetNextRoundNumbers();
   double RN_High = RoundNumberHigh;
   double RN_Low = RoundNumberHigh - 200 * Point * PipAdjust;
   double buy_price = 0;
   double sell_price = 0;
  
   if(Ask < RN_High && Bid < RN_High && Ask > RN_Low && Bid > RN_Low)
    {
     buy_price =   RN_High;
     sell_price =  RN_Low;
    }
    else if (Ask > RN_High && Bid > RN_High && Ask < RN_Low && Bid < RN_Low)
    {
     buy_price =   RN_Low;
     sell_price =  RN_High;
    }


Inserted Code
void GetNextRoundNumbers()    
{
   //Finds the nearest big numbers to the market price.
   //Saves these in RoundNumberHigh[index] and RoundNumberLow[index]
  
   RefreshRates();
  
   //Jpy pairs
   if (Digits == 2 || Digits == 3)
   {
      int price = Ask;//Truncates the quote
      RoundNumberLow = price;
      RoundNumberHigh = price + 1;
      
            
   }//if (Digits == 2 || Digits == 3)
   //non-Jpy pairs
   if (Digits == 4 || Digits == 5)
   {
      
      string sprice = DoubleToStr(Ask, Digits);
      if (Ask >= 10) sprice = StringSubstr(sprice, 0, 5);      
      if (Ask < 10) sprice = StringSubstr(sprice, 0, 4);      
      RoundNumberLow = StrToDouble(sprice);
      RoundNumberHigh = RoundNumberLow + 0.01;
      
   }
    
}
  • Post #44,380
  • Quote
  • Mar 3, 2021 12:32pm Mar 3, 2021 12:32pm
  •  RoninTheory
  • Joined Apr 2020 | Status: bit of a knoob.... | 714 Posts | Invisible
Quoting Phylo
Disliked
{quote} quick mod - short on time Comment out ' // ' below code as shown for immediate execution. //#property show_inputs Tip: It is not necessary to drag any script onto the chart - if the chart has focus/is the active chart just double click the script in the Navigator Panel and it will execute - this may or may not be more efficient for some than assigned hotkey execution. For more complex order closing see below video - https://www.youtube.com/watch?v=6BggwCLHnPY {file}
Ignored
thank you phylo for taking time out of your life to write wise and helpful words

wishing you good health

many thanks again
1
  • Platform Tech
  • /
  • I will code your EAs and Indicators for no charge
  • Reply to Thread
    • 1 22172218Page 221922202221 2268
    • 1 Page 2219 2268
4 traders viewing now, 3 are members:
chartistpro
,
Invisible
,
DavidRT
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021