Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   I will code your EAs and Indicators for no charge (https://www.forexfactory.com/showthread.php?t=166758)

Tshering Mar 25, 2019 11:35pm | Post# 28481

Dear Coders,

Can someone code me an EA where you can put time when you want to run(EA) and when you want to end. And when ending it should close all the open trade. Meaning there can be a lot of trades in a day but when that time comes it will close it as the last trade for the day and again runs back at the opening time. Thanks a lot guys.

mrithuns Mar 26, 2019 2:28am | Post# 28482

{quote} Maybe this will work datetime lastbar=0; int start(){ for(int i=Bars-IndicatorCounted()-1;i>=0;i--){ Close_0=Close; Open_0=Open; Open_1=Open[i+1]; Close_1=Close[i+1]; Open_2=Open[i+2]; Close_2=Close[i+2]; // some logic BuyEvent=True; // some crossover logic sellEvent=True; if(lastbar<Time[0]){ if(BuyEvent){ AreaCrossUp=Low-0.0002; loctime=TimeToString(TimeLocal(),TIME_DATE|TIME_MINUTES|TIME_SECONDS); if(i==0){ Alert("BUY: "+Symbol()+" "+Period()+" "+" "+loctime); sMsg="BUY: "+Symbol()+" "+Period()+" "+" "+loctime; SendMail("BUY:...
- Thanks a lot, Beerrun.

- I have fixed the issue of not setting an arrow for past conditions.
- Now I'm left out with one issue, as soon as I load this indicator to a chart, it sends one alert for the last passed condition. although the condition happened few candles ago and it's not a new condition on a new bar. so this is like an unwanted alert.

CollectPIPS Mar 26, 2019 2:35am | Post# 28483

BUY/SELL STOP LIMIT ORDERS EA

MT4 does not have built-in “Buy Stop Limit” & “Sell Stop Limit” order types as MT5 does (https://www.metatrader5.com/en/mobil...pt/order_types).

May I ask MT4 veterans here if there is any EA that allows us to achieve the same things (i.e. Stop Limit Orders) on MT4? If not, could some kind soul code an EA for this?

TIA!

Crazy_Guy_Fx Mar 26, 2019 3:16am | Post# 28484

3 Attachment(s)
need help please...
Click to Enlarge

Name: ZZ FAIL.png
Size: 145 KB
Click to Enlarge

Name: ZZ.png
Size: 142 KB
ZigZag_ws_Chanel_SweetSNR.mq4

wil1 Mar 26, 2019 4:05am | Post# 28485

Hello Traders/Coders, I am looking for someone to help me with a signal notification for this great indicator. it must also have push notification for for both email and phone. I thank you in advance. Kind Regards {file} {file}
hi
Do you have more explenation for this indicator. how it works, When it gives a signal? Then i can take look for giving mail alert

iiiabik1989 Mar 26, 2019 4:21am | Post# 28486

1 Attachment(s)
{quote} hi Do you have more explenation for this indicator. how it works, When it gives a signal? Then i can take look for giving mail alert
Click to Enlarge

Name: 2019-03-26_11-19-40.png
Size: 18 KB

Tilltheend Mar 26, 2019 5:07am | Post# 28487

Hi Friends,
is there any way t refresh Indicators attached to charts through any code?

e.g. below post shows way by which indicator values are refreshed (e.g. by changing timeframe/ restarting mt4/ editing indicator etc).
I need indicator to be autorefreshed, through some code which I shall incorporate in the indicator itself.
Can somebody please help.

https://www.forexfactory.com/showthr...70#post6390070

2tjv Mar 26, 2019 5:50am | Post# 28488

1 Attachment(s)
Can anyone fix this indicator? Any time I launch MT4, it disappears. Even though it's still present in Indicators List, it doesn't show on the current chart. If have another one better than this, can show me? I appreciate that and thank so much.
i-Profittracker.mq4

Beerrun Mar 26, 2019 6:26am | Post# 28489

{quote} - Thanks a lot, Beerrun. - I have fixed the issue of not setting an arrow for past conditions. - Now I'm left out with one issue, as soon as I load this indicator to a chart, it sends one alert for the last passed condition. although the condition happened few candles ago and it's not a new condition on a new bar. so this is like an unwanted alert.
My bad, change the first line from lastbar=0 to lastbar=Time[0]

iiiabik1989 Mar 26, 2019 6:30am | Post# 28490

1 Attachment(s)
Can anyone fix this indicator? Any time I launch MT4, it disappears. Even though it's still present in Indicators List, it doesn't show on the current chart. If have another one better than this, can show me? I appreciate that and thank so much. {file}
Click to Enlarge

Name: 2019-03-26_13-29-10.png
Size: 42 KB

Beerrun Mar 26, 2019 7:03am | Post# 28491

Hi Friends, is there any way t refresh Indicators attached to charts through any code? e.g. below post shows way by which indicator values are refreshed (e.g. by changing timeframe/ restarting mt4/ editing indicator etc). I need indicator to be autorefreshed, through some code which I shall incorporate in the indicator itself. Can somebody please help. https://www.forexfactory.com/showthr...70#post6390070
You can call deinit() and init(). The methods you linked do this as well.

wischo80 Mar 26, 2019 8:22am | Post# 28492

Hello Guys ,

i need a an semi pending order ea or a script ? with a mask by klicking buy limit or sell limit to fill a pending order from the privioús candle close with a distance . And also in the mask to have adjustable settings for example distance ( pips) , risk (%) , stop ( pips)

- the ea should only calculate the risk on the stoploss not to put it in the stoploss into the order this and the tradenmanagement will happen by another ea .


It will be fine if there is anybody out there .

ben862000 Mar 26, 2019 1:33pm | Post# 28493

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.


Inserted Code
#include <Controls\Button.mqh>
CButton  m_buttons[4];
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   m_buttons[0].Create(0,"SlowButton",0,10,50,70,75);
   m_buttons[0].Color(clrBlack);
   m_buttons[0].ColorBackground(clrOrange);
   m_buttons[0].FontSize(8);
   m_buttons[0].Text("Slow");
   m_buttons[0].ColorBorder(clrNONE);
   m_buttons[1].Create(0,"MedButton",0,70,50,130,75);
   m_buttons[1].Color(clrBlack);
   m_buttons[1].ColorBackground(clrYellow);
   m_buttons[1].FontSize(8);
   m_buttons[1].Text("Medium");
   m_buttons[1].ColorBorder(clrNONE);
   m_buttons[2].Create(0,"FastButton",0,130,50,190,75);
   m_buttons[2].Color(clrBlack);
   m_buttons[2].ColorBackground(clrGreen);
   m_buttons[2].FontSize(8);
   m_buttons[2].Text("Fast");
   m_buttons[2].ColorBorder(clrNONE);
   m_buttons[3].Create(0,"OffButton",0,190,50,250,75);
   m_buttons[3].Color(clrBlack);
   m_buttons[3].ColorBackground(clrLightGreen);
   m_buttons[3].FontSize(8);
   m_buttons[3].Text("Off");
   m_buttons[3].ColorBorder(clrNONE);
  
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
  }
int speed=0;
int m_current=-1;
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(!IsVisualMode())
      return;
   for(int i=0;i<ArraySize(m_buttons);i++)
     {
      if(m_buttons[i].Pressed())
         Select(i);
      if(m_buttons[0].Pressed()) speed=8000;
      if(m_buttons[1].Pressed()) speed=4000;
      if(m_buttons[2].Pressed()) speed=1000;
      if(m_buttons[3].Pressed()) speed=0;
     }
   if(speed>0)
      for(int i=0;i<=speed;i++) Comment(i);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void Select(const int index)
  {
//--- disable the "ON" state
   if(m_current!=-1)
      RowState(m_current,false);
//--- enable the "ON" state
   if(index!=-1)
      RowState(index,true);
//--- save value
   m_current=index;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool RowState(const int index,const bool select)
  {
//--- check index
   if(index<0 || index>=4)
      return(true);
//--- change state
   return(m_buttons[index].Pressed(select));
  }

2tjv Mar 26, 2019 6:07pm | Post# 28494

{quote} {image}
If you turn MT4 off and then launch again, it will disappear. Please try it!

PeterE Mar 26, 2019 8:06pm | Post# 28495

2 Attachment(s)
Anyone want to try adding a % value to the attached ADR indicator?


Indicator currently reads 55.6 | 10.1 (see image); where 55.6 = 30 day ADR, and 10.1 = today's move so far

It would be good to have a % value added to today's move.

For example, 55.6 | 10.1 = 18%

.
Click to Enlarge

Name: 2019-03-27_0959.png
Size: 15 KB
ADR simple.mq4

fxdragon Mar 26, 2019 8:35pm | Post# 28496

hi GD friends, anybody has indicator for open multi limit order. please share it. thank you

Fxforum Mar 26, 2019 9:50pm | Post# 28497

1 Attachment(s)
Anyone want to try adding a % value to the attached ADR indicator? Indicator currently reads 55.6 | 10.1 (see image); where 55.6 = 30 day ADR, and 10.1 = today's move so far It would be good to have a % value added to today's move. For example, 55.6 | 10.1 = 18% . {image} {file}
Not the same but anyhow try it...
25%M.ex4

Tilltheend Mar 26, 2019 10:20pm | Post# 28498

{quote} You can call deinit() and init(). The methods you linked do this as well.
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 for all candles.

string MultiMkts[4] = {"EURUSD","GBPUSD","AUDUSD","USDCAD"};
double ExtMapBuffer[];

int init()
{
SetIndexStyle(0,DRAW_LINE,0,2,Yellow);
SetIndexBuffer(0,ExtMapBuffer);
}

int start()
{
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);
}

dmtrkostop Mar 26, 2019 10:52pm | Post# 28499

{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 for all candles. string MultiMkts[4] = {"EURUSD","GBPUSD","AUDUSD","USDCAD"}; double ExtMapBuffer[]; int init() { SetIndexStyle(0,DRAW_LINE,0,2,Yellow); SetIndexBuffer(0,ExtMapBuffer); } int start() { 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++)...

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)


PeterE Mar 26, 2019 11:02pm | Post# 28500

{quote} Not the same but anyhow try it... {file}
not quite, but thanks anyway


© Forex Factory