• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 10:59am
  • Search
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 10:59am
Search
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Search
Search
Search

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Fixing Your Indicators or EAs (Free) 346 replies

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

EAs and indicators relating to moutaki... 22 replies

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

Oanda MT4 - Indicators and EAs not showing 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 20,802
Attachments: I will code your EAs and Indicators for no charge
Exit Attachments

I will code your EAs and Indicators for no charge

  • Last Post
  •  
  • 1 14241425Page 142614271428 1588
  • 1 Page 1426 1588
  •  
  • Post #28,501
  • Quote
  • Edited Mar 27, 2019 12:29am Mar 26, 2019 11:53pm | Edited Mar 27, 2019 12:29am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,248 Posts
Quoting ben862000
Disliked
Hello Guys, How to disable Obj_Button from clicking in OnTick Function at Testing mode. I want to disable a button after pressing one time only. it will stay pressed state until i press other button.
Ignored
You should be using CChartObjectButton instead of CButton. CButton is for use with CAppDialog. This is how I do it.
Inserted Code
#property strict
#include <chartobjects/chartobjectstxtcontrols.mqh>
#include <arrays/list.mqh>
class Buttons;
//+------------------------------------------------------------------+
class MyButton : public CChartObjectButton {
protected:
   static int     s_num;
   Buttons       *m_mgr;
public:
   MyButton(Buttons *mgr):m_mgr(mgr){}
   bool create(string title, int x,int y,int xsize, int ysize);
   bool onclick(string button_name);
};
int MyButton::s_num = 0;
bool MyButton::create(string title, int x,int y,int xsize, int ysize) {
   return (
      this.Create(0, "__button__" + string(++s_num), 0, x, y, xsize, ysize)
      && this.Description(title)
   );
}
bool MyButton::onclick(string button_name) {
   if (button_name != this.Name())
      return false;
   if (!this.State())
      this.State(true);
   else
      for (MyButton *b=m_mgr.GetFirstNode(); CheckPointer(b); b=b.Next())
         if (&this != b)
            b.State(false);
   return true;
}
//+------------------------------------------------------------------+
class Buttons : public CList {
public:
   bool init(int num_buttons);
   bool newButton(string title="Button");
   void onclick(string button);
};
bool Buttons::init(int num_buttons) {
   for (int i=0; i<num_buttons; i++)
      if (!this.newButton(string(i+1)))
         return false;
   return true;
}
void Buttons::onclick(string button_name) {
   for (MyButton *b=this.GetFirstNode(); CheckPointer(b); b=b.Next())
      if (b.onclick(button_name))
         break;
}
bool Buttons::newButton(string title="Button") {
   MyButton *b = new MyButton(&this);
   int n = this.Total();
   return (b.create(title, n * 50, 50, 50, 50) && this.Add(b) >= 0);
}
//+------------------------------------------------------------------+
Buttons *g_buttons;
//+------------------------------------------------------------------+
int OnInit() {  
   g_buttons = new Buttons();
   return g_buttons.init(20) ? INIT_SUCCEEDED : INIT_FAILED;
}
void OnDeinit(const int reason) {
   delete g_buttons;  
}
//+------------------------------------------------------------------+
void OnTick() {}
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
{
   if (id == CHARTEVENT_OBJECT_CLICK)
      g_buttons.onclick(sparam);
}
//+------------------------------------------------------------------+
  • Post #28,502
  • Quote
  • Mar 27, 2019 1:08am Mar 27, 2019 1:08am
  •  Tilltheend
  • | Joined Sep 2014 | Status: Member | 53 Posts
Quoting dmtrkostop
Disliked
{quote} HiTilltheend, I tried uploading the image from investopedia with the formula, but the file format was not valid. I have the link pasted below with the formula. https://www.investopedia.com/terms/f/force-index.asp Force Index (1) = (Current Close Price - Prior Close Price) * Volume Force Index (13) = 13 Period EMA of Force Index (1)
Ignored
Hi, sorry I don't get it.
What is Force Index to do with my issue of refreshing sub-window indicator data?
  • Post #28,503
  • Quote
  • Mar 27, 2019 1:57am Mar 27, 2019 1:57am
  •  ben862000
  • | Joined Dec 2017 | Status: Junior Member | 2 Posts
Quoting Nicholishen
Disliked
{quote} You should be using CChartObjectButton instead of CButton. CButton is for use with CAppDialog. This is how I do it. #property strict #include <chartobjects/chartobjectstxtcontrols.mqh> #include <arrays/list.mqh> class Buttons; //+------------------------------------------------------------------+ class MyButton : public CChartObjectButton { protected: static int s_num; Buttons *m_mgr; public: MyButton(Buttons *mgr):m_mgr(mgr){} bool create(string title, int x,int y,int xsize, int ysize); bool onclick(string button_name); }; int MyButton::s_num...
Ignored
How about in strategy testing mode?
i want to detect it in the OnTick() Function.
  • Post #28,504
  • Quote
  • Mar 27, 2019 2:28am Mar 27, 2019 2:28am
  •  A725859
  • | Joined Mar 2019 | Status: Junior Member | 1 Post
Hi Guys,

Any one here having an EA that opens two pending orders buy ad sell at given points as input. I need to use that i news time and with correlation pairs.

Thanks
  • Post #28,505
  • Quote
  • Mar 27, 2019 5:40am Mar 27, 2019 5:40am
  •  PipBros
  • | Joined Jul 2018 | Status: Member | 60 Posts | Online Now
Good day

Can someone please code an sound and email alert for this indicator. Alert must happen when MACD lines have crossed on the close of that candle
Attached File
File Type: mq4 MACD-LWMA.mq4   2 KB | 152 downloads
  • Post #28,506
  • Quote
  • Mar 27, 2019 6:24am Mar 27, 2019 6:24am
  •  Gr3Ch
  • | Joined Mar 2019 | Status: Junior Member | 3 Posts
Hello Nicholishen, I have one question about FFEvents. Can u help me with that problem ?
  • Post #28,507
  • Quote
  • Mar 27, 2019 7:26am Mar 27, 2019 7:26am
  •  Beerrun
  • Joined Jan 2016 | Status: Member | 306 Posts
Quoting Tilltheend
Disliked
{quote} Thanks for revert. Can you please tell how to do it? Below is the code. It is very simple indicator. It displays ExtMapBuffer, as Line in subwindow
Ignored
You would have to be more specific and actually show your code, this is only part of it.
  • Post #28,508
  • Quote
  • Mar 27, 2019 8:07am Mar 27, 2019 8:07am
  •  Tilltheend
  • | Joined Sep 2014 | Status: Member | 53 Posts
Quoting Beerrun
Disliked
{quote} You would have to be more specific and actually show your code, this is only part of it.
Ignored
Below is entire code, its very simple indicator. It displays ExtMapBuffer, in form of a line in subwindow. This takes close price from other currencies.

Issue: refresh of data (shown as Line in subwindow) is not proper. When I change timeframe n come back to original timeframe (or edit indicator/ compile indicator), then data becomes proper.

Resolution needed: data should refresh, without need to change timeframe etc.
Thanks.

*****
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Gold
int Bull=0, Bear=0;
string MultiMkts[4] = {"EURUSD","GBPUSD","AUDUSD","USDCAD"};
double ExtMapBuffer[];
int Back = 15000;
int init()
{
SetIndexStyle(0,DRAW_LINE,0,2,Yellow);
SetIndexBuffer(0,ExtMapBuffer);
}
int start()
{
if(Bars<1) return(0);
int counted_bars = IndicatorCounted();
if (counted_bars > 0) counted_bars--;
int limit = MathMin(Back, (Bars - counted_bars));
for (int i = 0; i <= limit; i++)
{
Bull = 0; Bear = 0;
for(int j=0;j<ArraySize(MultiMkts);j++)
{
string Symbol_Name = MultiMkts[j];
if(iClose(Symbol_Name,0,i) > iMA(Symbol_Name,0,20,0,MODE_EMA,0,i))
Bull=Bull+1;
else
Bear=Bear+1;
}
ExtMapBuffer[i] = (Bull - Bear);
}
return(0);
}

*****
  • Post #28,509
  • Quote
  • Mar 27, 2019 8:51am Mar 27, 2019 8:51am
  •  NewSim
  • | Joined Mar 2019 | Status: Member | 27 Posts
Hi, I got this indicator
Attached Image (click to enlarge)
Click to Enlarge

Name: Capture.JPG
Size: 146 KB
Attached File
File Type: ex4 Open Levels.ex4   44 KB | 120 downloads
from Cja on another thread, and it's been great. The only problem is that you can't shift the daily open start time. I was wondering if someone could make something similar to this, but with the ability to shift the daily open start time.

I've put an example of a shifted daily open indicator
Attached Image (click to enlarge)
Click to Enlarge

Name: Capture2.JPG
Size: 119 KB
but it doesn't have the -3x -2x -x DO +x +2x +3x pips levels etc.
New Simulation
  • Post #28,510
  • Quote
  • Edited at 9:45am Mar 27, 2019 9:23am | Edited at 9:45am
  •  Beerrun
  • Joined Jan 2016 | Status: Member | 306 Posts
Quoting Tilltheend
Disliked
{quote} Below is entire code, its very simple indicator. It displays ExtMapBuffer, in form of a line in subwindow. This takes close price from other currencies. Issue: refresh of data (shown as Line in subwindow) is not proper. When I change timeframe n come back to original timeframe (or edit indicator/ compile indicator), then data becomes proper. Resolution needed: data should refresh, without need to change timeframe etc. Thanks. ***** #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Gold int Bull=0,...
Ignored
I tried to clean it up, but I am doing this on my phone at work so I might have missed something. The only real changes I did were to your loops.
Inserted Code
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Gold
int Bull=0,Bear=0,Back=15000;
string MultiMkts[4]={"EURUSD","GBPUSD","AUDUSD","USDCAD"};
double ExtMapBuffer[];
int init() { SetIndexStyle(0,DRAW_LINE,0,2,Yellow); SetIndexBuffer(0,ExtMapBuffer);
return(0);}
int start() {
int counted_bars=IndicatorCounted();
if(counted_bars>0)counted_bars--;
for(int i=MathMin(Back,(Bars-counted_bars));i>=0;i—){
Bull=Bear=0;
for(int j=ArraySize(MultiMkts);j>=0;j—){
string Symbol_Name=MultiMkts[j];
if(iClose(Symbol_Name,0,i)> iMA(Symbol_Name,0,20,0,MODE_EMA,0,i))Bull++;
else Bear=++;}
ExtMapBuffer[i]=(Bull-Bear);}
return(0);}
  • Post #28,511
  • Quote
  • Mar 27, 2019 9:24am Mar 27, 2019 9:24am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,248 Posts
Quoting ben862000
Disliked
{quote} How about in strategy testing mode? i want to detect it in the OnTick() Function.
Ignored
Inserted Code
#property strict
#include <chartobjects/chartobjectstxtcontrols.mqh>
#include <arrays/list.mqh>
class Buttons;
//+------------------------------------------------------------------+
class MyButton : public CChartObjectButton {
protected:
   static int     s_num;
   Buttons       *m_mgr;
   int            m_status;
public:
   MyButton(Buttons *mgr):m_mgr(mgr){}
   bool create(string title, int x,int y,int xsize, int ysize);
   bool onclick(string button_name);
   int  status() { return m_status; }
};
int MyButton::s_num = 0;
bool MyButton::create(string title, int x,int y,int xsize, int ysize) {
   m_status = ++s_num;
   return (
      this.Create(0, "__button__" + string(m_status), 0, x, y, xsize, ysize)
      && this.Description(title)
   );
}
bool MyButton::onclick(string button_name) {
   if (button_name != this.Name())
      return false;
   if (!this.State()) {
      this.State(true);
   }
   else {
      for (MyButton *b=m_mgr.GetFirstNode(); CheckPointer(b); b=b.Next()) 
         if (&this != b) 
            b.State(false);
      m_mgr.active(&this);
   }
   return true;
}
//+------------------------------------------------------------------+
class Buttons : public CList {
protected:
   MyButton *m_active;
public:
   bool init(int num_buttons);
   bool newButton(string title="Button");
   void onclick(string button);
   void active(MyButton *b);
   int  status();
};
bool Buttons::init(int num_buttons) {
   for (int i=0; i<num_buttons; i++)
      if (!this.newButton(string(i+1)))
         return false;
   return true;
}
void Buttons::onclick(string button_name) {
   for (MyButton *b=this.GetFirstNode(); CheckPointer(b); b=b.Next())
      if (b.onclick(button_name))
         break;
}
bool Buttons::newButton(string title="Button") {
   MyButton *b = new MyButton(&this);
   int n = this.Total();
   return (b.create(title, n * 50, 50, 50, 50) && this.Add(b) >= 0);
}
void Buttons::active(MyButton *b) {
   m_active = b;
}
int Buttons::status(void) {
   if (!CheckPointer(m_active)) {
      for (MyButton *b=this.GetFirstNode(); CheckPointer(b); b=b.Next()) {
         if (b.State()) {
            m_active = b;
            break;
         }
      }
   }
   if (CheckPointer(m_active))
      return m_active.status();
   return WRONG_VALUE;
}
//+------------------------------------------------------------------+
Buttons *g_buttons;
//+------------------------------------------------------------------+
int OnInit() {   
   g_buttons = new Buttons();
   return g_buttons.init(20) ? INIT_SUCCEEDED : INIT_FAILED;
}
void OnDeinit(const int reason) {
   delete g_buttons;   
}
//+------------------------------------------------------------------+
void OnTick() {
   Comment(StringFormat("status(%d) from onTick", g_buttons.status()));
}
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
{
   if (id == CHARTEVENT_OBJECT_CLICK)
      g_buttons.onclick(sparam);
}
//+------------------------------------------------------------------+
  • Post #28,512
  • Quote
  • Mar 27, 2019 11:24am Mar 27, 2019 11:24am
  •  Tilltheend
  • | Joined Sep 2014 | Status: Member | 53 Posts
Quoting Beerrun
Disliked
{quote} I tried to clean it up, but I am doing this on my phone at work so I might have missed something. The only real changes I did were to your loops. #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Gold int Bull=0,Bear=0,Back=15000; string MultiMkts[4]={"EURUSD","GBPUSD","AUDUSD","USDCAD"}; double ExtMapBuffer[]; int init() { SetIndexStyle(0,DRAW_LINE,0,2,Yellow); SetIndexBuffer(0,ExtMapBuffer); return(0);} int start() { int counted_bars=IndicatorCounted(); if(counted_bars>0)counted_bars--; for(int...
Ignored
Thanks buddy for changes, but it has not resolved the issue.

Just thinking aloud.. May be need to trigger event thru code, (even periodic update is fine), which wud recalculate data properly. The way it does when timeframe changed/ indicator edited.
  • Post #28,513
  • Quote
  • Edited at 12:32pm Mar 27, 2019 12:16pm | Edited at 12:32pm
  •  Beerrun
  • Joined Jan 2016 | Status: Member | 306 Posts
Quoting Tilltheend
Disliked
{quote} Thanks buddy for changes, but it has not resolved the issue. Just thinking aloud.. May be need to trigger event thru code, (even periodic update is fine), which wud recalculate data properly. The way it does when timeframe changed/ indicator edited.
Ignored
Try this, a (-1) was missing from the symbols array loop initialization. You have probably been getting an “array out of range” error, which would stop your code at that place, allowing it to only work properly until the error.
Inserted Code
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Gold
string MultiMkts[4]={"EURUSD","GBPUSD","AUDUSD","USDCAD"};
double ExtMapBuffer[];
int init(){
SetIndexStyle(0,DRAW_LINE,0,2,Yellow);
SetIndexBuffer(0,ExtMapBuffer);
return(0);}
int start(){
for(int i=Bars-IndicatorCounted()-1;i>=0;i—){
int Bull=0,Bear=0;
for(int j=ArraySize(MultiMkts)-1;j>=0;j—){
string Symbol_Name=MultiMkts[j];
if(iClose(Symbol_Name,0,i)>iMA(Symbol_Name,0,20,0,MODE_EMA,0,i))Bull++;
else Bear=++;}
ExtMapBuffer[i]=(Bull-Bear);}
return(0);}
  • Post #28,514
  • Quote
  • Mar 27, 2019 12:33pm Mar 27, 2019 12:33pm
  •  dmtrkostop
  • | Joined Mar 2019 | Status: Junior Member | 4 Posts
Quoting Tilltheend
Disliked
{quote} Hi, sorry I don't get it. What is Force Index to do with my issue of refreshing sub-window indicator data?
Ignored
My mistake, this was the first time I received an email notification for the thread, and accidentally saw it as a response to my request. Disregard my reply.
  • Post #28,515
  • Quote
  • Mar 27, 2019 2:02pm Mar 27, 2019 2:02pm
  •  Tilltheend
  • | Joined Sep 2014 | Status: Member | 53 Posts
Quoting Beerrun
Disliked
{quote} Try this, a (-1) was missing from the symbols array loop initialization. You have probably been getting an “array out of range” error, which would stop your code at that place, allowing it to only work properly until the error. #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Gold string MultiMkts[4]={"EURUSD","GBPUSD","AUDUSD","USDCAD"}; double ExtMapBuffer[]; int init(){ SetIndexStyle(0,DRAW_LINE,0,2,Yellow); SetIndexBuffer(0,ExtMapBuffer); return(0);} int start(){ for(int i=Bars-IndicatorCounted()-1;i>=0;i—){...
Ignored
No worries. I had corrected that in your earlier code. Still the issue persists.
1
  • Post #28,516
  • Quote
  • Mar 27, 2019 2:53pm Mar 27, 2019 2:53pm
  •  Beerrun
  • Joined Jan 2016 | Status: Member | 306 Posts
Quoting Tilltheend
Disliked
{quote} No worries. I had corrected that in your earlier code. Still the issue persists.
Ignored
It works correctly for me
Inserted Code
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 clrGold
string MultiMkts[4]={"EURUSD","GBPUSD","AUDUSD","USDCAD"};
double ExtMapBuffer[];
int init(){
  SetIndexStyle(0,DRAW_LINE,0,2,Yellow);
  SetIndexBuffer(0,ExtMapBuffer);
  return(0);}
int start(){
  for(int i=Bars-IndicatorCounted()-1;i>=0;i--){
   int Bull=0,Bear=0;
   for(int j=ArraySize(MultiMkts)-1;j>=0;j--){
    string Symbol_Name=MultiMkts[j];
    if(iClose(Symbol_Name,0,i)>iMA(Symbol_Name,0,20,0,MODE_EMA,0,i))Bull++;
    else Bear++;}
  ExtMapBuffer[i]=(Bull-Bear);}
  return(0);}
Attached File
File Type: mq4 ClosePrices.mq4   1 KB | 126 downloads
  • Post #28,517
  • Quote
  • Mar 27, 2019 6:30pm Mar 27, 2019 6:30pm
  •  luisinho
  • Joined Oct 2015 | Status: Member | 38 Posts
Quoting PeterE
Disliked
Anyone ...
Ignored

hi

Attached File
File Type: mq4 ADR simple.mq4   2 KB | 224 downloads


Attached Image


(:
  • Post #28,518
  • Quote
  • Mar 27, 2019 7:42pm Mar 27, 2019 7:42pm
  •  classy
  • Joined Jun 2012 | Status: Trader , Analyst and Mentor | 3,542 Posts
i am looking for one indicator /dashboard which show one pair how pip gains for example from open or start pair move up 20 pips and down 10 pips so dash borad show green or +10 pips opposite -10 i mean if pair go up 10 and down 20 from day start. by this tool we can watch and measure pair performane.which trending /ranging .showing strengths /dominatiing and i think it will great info for any trader
Say something meaningful or Silence!!
  • Post #28,519
  • Quote
  • Mar 27, 2019 7:45pm Mar 27, 2019 7:45pm
  •  stesy
  • | Joined Nov 2016 | Status: Member | 56 Posts
Quoting Fxforum
Disliked
{quote} Not the same but anyhow try it... {file}
Ignored
what TF is the 25%M.ex4, do you mind sharing the .mq4 to adjust a bit according to my trade? THX
  • Post #28,520
  • Quote
  • Mar 27, 2019 8:40pm Mar 27, 2019 8:40pm
  •  PeterE
  • Joined Oct 2009 | Status: magic | 1,615 Posts
Quoting luisinho
Disliked
{quote} hi {file} {image} (:
Ignored
Fantastic!! Big thank you.
1
Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email This Thread Email This Thread
Search this Thread:

Advanced Search

  • Platform Tech
  • /
  • I will code your EAs and Indicators for no charge
  • Reply to Thread
    • 1 14241425Page 142614271428 1588
    • 1 Page 1426 1588
9 traders viewing now, 4 are members:
emmy4
,
Invisible
,
geumwon
,
micel
  • 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 / ©2019