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)

Islandfx911 Jul 21, 2019 6:41am | Post# 29881

Can anyone help to make minor changes to this code please?
I would like the SL range from 5 pips to 20 pips.
If anyone can help I'll need new code as a .mq4 file

Regards
Rob


Attached Image (click to enlarge)
https://www.forexfactory.com/attachm...1&d=1563588127





#property copyright ""
#property link ""
#property strict

#property indicator_separate_window

extern int FontSize=8;
extern color FontColor=DeepSkyBlue;
extern int XDistance=10;// X location
extern int YDistance=10;// Y location
extern double Risk=2;// Risk (%)

//--------------------------------------------------------------------
int init()
{
IndicatorShortName("");
return(0);
}

int deinit()
{
Comment("");

ObjectsDeleteAll();
return(0);
}
//--------------------------------------------------------------------

int BarsCount = 0;

int totalprofit = 0;
int totalloss = 0;
int countbuy = 0;
int countsell = 0;

int start()
{
double bal = AccountEquity();
string s = "SL (pips)|";
string s2 = "Lot Size |";
make_label("sl",s,XDistance,YDistance);
make_label("lots",s2,XDistance,YDistance+(FontSize*2));

for(int i = 0; i <= 20; i++)
{
double lot = (bal*(Risk/100.0)) / ((10+i)*10* MarketInfo(Symbol(), MODE_TICKVALUE));

if(0.01 == MarketInfo(0,MODE_MINLOT))
{
lot = NormalizeDouble(lot,2);

if(lot < 0.01){lot = 0.01;}
else{}
}
else if(0.1 == MarketInfo(0,MODE_MINLOT))
{
lot = NormalizeDouble(lot,1);

if(lot < 0.1){lot = 0.1;}
else{}
}
else if(1.0 == MarketInfo(0,MODE_MINLOT))
{
lot = NormalizeDouble(lot,0);

if(lot < 1.0){lot = 1.0;}
else{}
}
else{}

s = (10+i)+" |";
s2 = DoubleToStr(lot,2)+" |";

make_label("sl"+i,s,XDistance+(0+(FontSize*8))+((10+(FontSize*4))*i),YDistance);
make_label("lots"+i,s2,XDistance+(0+(FontSize*8))+((10+(FontSize*4))*i),YDistance+(FontSize*2));
}

return(0);
}

void DrawPriceHHLine(datetime x1, datetime x2, double y1,
double y2, color lineColor, double style)
{
string label = "HHLine.0# " + DoubleToStr(x2, 0) + lineColor;
ObjectDelete(label);
ObjectCreate(label, OBJ_TREND, 0, x1, y1, x2, y2, 0, 0);
ObjectSet(label, OBJPROP_RAY, 0);
ObjectSet(label, OBJPROP_COLOR, lineColor);
ObjectSet(label, OBJPROP_STYLE, style);
ObjectSet(label, OBJPROP_WIDTH, 1);

}

void make_label(string sl,string l,int x,int y)
{
ObjectCreate("l"+sl, OBJ_LABEL, WindowsTotal()-1, 0, 0);
ObjectSetText("l"+sl, l , FontSize, "Verdana", FontColor);
ObjectSet("l"+sl, OBJPROP_CORNER, 0);
ObjectSet("l"+sl, OBJPROP_XDISTANCE, x);
ObjectSet("l"+sl, OBJPROP_YDISTANCE, y);
}

dicodico Jul 21, 2019 6:57am | Post# 29882

[quote=mntiwana;12393957]
{quote} Akh,these are so many variations,dont know which suits you
where can i find them to choose ??????

mntiwana Jul 21, 2019 8:28am | Post# 29883

[quote=dicodico;12394366]
{quote} where can i find them to choose ??????
Sorry,advertising other sites is prohibited (in every forum)
you can find within my "shanta" - and or at wide wide net -
will be post some day
regards

jobloggs Jul 21, 2019 9:04am | Post# 29884

{quote} SuperTrend Histo {file}
Thanks dude. Greatly appreciated.

reteid2222 Jul 21, 2019 10:25am | Post# 29885

How to calculate the stoplevel for backtest to get sure that the sl is not to near the price?
MarketInfo(symbol,MODE_STOPLEVEL) returns simply 0!

miyamiya Jul 21, 2019 3:51pm | Post# 29886

{quote} 画像のリンクを投稿してください - これはコーダーが結果を比較するのに役立ちます - また、このスレッドは共有についてです、 Gazō no rinku o tōkō shite kudasai - kore wa kōdā ga kekka o hikaku...
Dear Coders.

If you are interested please read the description and create an indicator.

https://www.babypips.com/learn/forex...ading-sessions


Auto session indicator + session averege volatility(pips) indicator = "WE NEED INDICATOR".
https://imgur.com/5jtCV4G
I made a description.
I want to be able to set up "period" and "time slot"
https://www.forexfactory.com/showthread.php?p=12394383

Thanks,

badrooh Jul 21, 2019 4:17pm | Post# 29887

Hey Guys, i want to learn and improve my MQL4 skills. I think the best way to do this is to practice. Unfortunately sometimes I don`t have any nice idea which i can implement in a Expert Advisor / Indicator. So if any of you is interested, please post in this forum your ideas and i will try to implement it into mql4. Andi
I want a simple indicator for binary options. please help me

>> make an alert on every second same (bull or bear) candle with and adjustable arrow size.

i will be thankful to you.

Phylo Jul 21, 2019 4:36pm | Post# 29888

This kino-T3MA indicator is not showing on charts and I don’t know why. Kindly help in fixing it. {file}
To any interested in original code

modified code
Inserted Code
//+------------------------------------------------------------------+
//|                                                    MA ribbon.mq4 |
//|                                               mladenfx@gmail.com |
//|                                                                  |
//| original idea by Jose Silva                                      |
//+------------------------------------------------------------------+
#property copyright "mladen"
#property link      "mladenfx@gmail.com"
// modification kinonen Fev 2009
original code
Inserted Code
//+------------------------------------------------------------------+
//|                                                   MA ribbon.mq4 |
//|                                               mladenfx@gmail.com |
//|                                                                  |
//| original idea by Jose Silva                                      |
//+------------------------------------------------------------------+
#property copyright "mladen"
#property link      "mladenfx@gmail.com"

Original source - https://www.mql5.com/en/forum/178821

FXsniper111 Jul 21, 2019 4:43pm | Post# 29889

Hello i have looked and searched all over the forum for a EA that can be put on one chart and that can hold new trades on all pairs and charts with another EA going.. Say between 20:00-04:00,but lets trades opened to finnish with trail and move to BE still in play....So can not be that it shuts off autotrading but simply holds new trades at the given time..

I belive should be very possible for a coder to do this and also i am sure this cind of EA already is outthere somewhere,but i just couldnt find it..

The reason for this is i have a EA that is proffiteble when its volume in the market,but looses some when market is slow..

Teee Jul 21, 2019 10:22pm | Post# 29890

1 Attachment(s)
Could you please add Push and mail notice the indicator?
Thank you.
cTD Sequential v2 Alert.mq4

Phylo Jul 22, 2019 2:44am | Post# 29891

Could you please add Push and mail notice the indicator? Thank you. {file}
If no response - see here - https://www.forexfactory.com/showthr...8#post12365748

awankuku Jul 22, 2019 4:51am | Post# 29892

1 Attachment(s)
hy everybody, i need your help, please edit the indicator to add alert/push notification
my email { email address deleted by staff }
Gst Signal 3~.mq4

Ican2020 Jul 22, 2019 6:16am | Post# 29893

2 Attachment(s)
Hi, everyone, I need help to create EA for trading multiple pairs, please.
Just like the below image with some modification to include space to add 28 currency pairs
Name:  Like This.PNG
Views: 1149
Size:  22 KB
Name:  28 pairs.PNG
Views: 1161
Size:  123 KB

emeke Jul 22, 2019 7:06am | Post# 29894

Hello guys,
I need help creating an indicator from the combination of 2 EMAs and stochastic oscillator. Can it be done ?

investwisely Jul 22, 2019 8:22am | Post# 29895

Hello guys, I need help creating an indicator from the combination of 2 EMAs and stochastic oscillator. Can it be done ?
i can create the ea if you can specify what you need i.e. ema + stoch; open close settings. lot size; tp; sl etc..

jobloggs Jul 22, 2019 9:13am | Post# 29896

2 Attachment(s)
Hi there people.
Let me just say im not the most experienced trader. I dont know much about I.T. or Indicator design. I realize some indicators are licenced for their coding design. Here is my question to you people. How do you tell whether a indicator has a licence ? Because this particular indicator ive included id like to turn into EA unless someone could alter it and make it to do what i would like it to do.

Id love it if someone could build a Arrow Trend Indicator Dashboard something like this ? So that it is able to provide the direction of the last arrows on all the time frames for one currency pair. Obviously the green and red colours are the arrow directions.
With also the option to be able to choose what time frames id like to have to be able to give one major signal when all the arrows align in the same direction on one currency pair on the time frames chosen it gives you a major signal.
Powered_Trend_Signal_Arrow_Alert - 2.ex4
Name:  Dashboard.jpg
Views: 1111
Size:  48 KB

emeke Jul 22, 2019 9:18am | Post# 29897

3 Attachment(s)
{quote} i can create the ea if you can specify what you need i.e. ema + stoch; open close settings. lot size; tp; sl etc..
ok thanks.
For a sell signal , I have the following conditions
1. 20 MA has crossed below 48 MA ( both heading down )
2. Candle closes below 20MA
Note Both are Exponential or Linear weighted
3. For the Stochastic Oscillator (14,3,3)
The main line has crossed below the signal line and both are heading down.

I need an indicator that can go off if the set up described above happens . I would like to determine my sl & tp for a start Attachment 3392231Attachment 3392232

The yellow lines in pic 2 mark the set-up .
Then The buy signal would be the exact opposite of the description above.
Click to Enlarge

Name: setup3.png
Size: 116 KB

albry Jul 23, 2019 12:24am | Post# 29898

1 Attachment(s)
Hi,

{quote} ok thanks. For a sell signal , I have the following conditions 1. 20 MA has crossed below 48 MA ( both heading down ) 2. Candle closes below 20MA Note Both are Exponential or Linear weighted 3. For the Stochastic Oscillator (14,3,3) The main line has crossed below the signal line and both are heading down. I need an indicator that can go off if the set up described above happens . I would like to determine my sl & tp for a start {image}{image} The yellow lines in pic 2 mark the set-up . Then The buy signal would be the exact opposite of the description above. {image}

Here are the signals that would be generated from what I understand to be your 2-MA, Stoch, Close-MA cross specification.
Seems like a lot of thrashing during ranging market, which might need further suggestions/clarifications/considerations?

Al
Click to Enlarge

Name: 2019.07.23_07.04.52_GBPJPY__H1-Screenshot.gif
Size: 102 KB

bosslife Jul 23, 2019 5:50am | Post# 29899

can someone tell me what i have to delete in order to export ONLY close prices without any comma? all my attempts failed (

Inserted Code
//--------------------------------
//----
 int handle;
 
 //number of bars to export per Symbol
 int maxBars = 2000;
 //test first on several pairs
string Currencies[] = {"EURUSD","GBPUSD"};
 
 
 // then add more in the same format
// string Currencies[] = {"AUDUSD","EURUSD","GBPJPY","GBPUSD","EURJPY","EURGBP","USDCHF","USDJPY","AUDJPY","CHFJPY","CADJPY","GBPCAD","EURAUD","USDCAD","EURCAD","NZDUSD","NZDJPY"};
string dSymbol;
//+------------------------------------------------------------------+
//|  start function                                    |
//+------------------------------------------------------------------+
int start(){
 int count = ArraySize(Currencies);
 for (int ii=0; ii<count; ii++){
 dSymbol = Currencies[ii];  
 handle = FileOpen("Hist_"+dSymbol+"_"+GetPeriodName()+".csv", FILE_BIN|FILE_WRITE);
if(handle < 1){
 Print("Err ", GetLastError());
return(0);
}
 WriteTABLEHeader();
for(int i = 0; i < maxBars - 1; i++){
 WriteRow(i);
}
 FileClose(handle);
}
 Alert("Done."+TimeMonth(TimeLocal())+TimeDay(TimeLocal())+TimeYear(TimeLocal()) +"_"+TimeHour(TimeLocal())+TimeMinute(TimeLocal()));
  return(0);
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void WriteString(string txt){
   FileWriteString(handle, txt,StringLen(txt));
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void WriteTABLEHeader(){
 WriteString("Date,");
 WriteString("Time,");
 WriteString("DayOfWeek,");
 WriteString("Open,");
 WriteString("High,");
 WriteString("Low,");
 WriteString("Close,");
 WriteString("Volume,");
 WriteString("\n");
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void WriteRow(int i){
 
 double  dSymTime, dSymOpen, dSymHigh, dSymLow, dSymClose, dSymVolume;
 double  dSymHigh_D1,dGap;
 int dDayofWk,iDigits;
 string bandDistance;
 double dClose, dOpen,Poin,dblPoints;
 dSymTime = (iTime(dSymbol,Period(),i));
 dDayofWk = (TimeDayOfWeek(dSymTime));
 WriteString(TimeToStr(dSymTime, TIME_DATE ));
 WriteString(",");
 if(Period() < PERIOD_H4){
 WriteString(TimeToStr(Time[i], TIME_MINUTES)+","+dDayofWk+",");
}
 iDigits=MarketInfo(Symbol(),MODE_DIGITS);
 dSymOpen = (iOpen(dSymbol,Period(),i));
 dSymHigh = (iHigh(dSymbol,Period(),i));
 dSymHigh_D1 = (iHigh(dSymbol,Period(),i));
 dSymLow = (iLow(dSymbol,Period(),i));
 dSymClose = (iClose(dSymbol,Period(),i));
 dSymVolume = (iVolume(dSymbol,Period(),i));
 WriteString(DoubleToStr(dSymOpen, iDigits)+",");
 WriteString(DoubleToStr(dSymHigh, iDigits)+",");
 WriteString(DoubleToStr(dSymLow, iDigits)+",");
 WriteString(DoubleToStr(dSymClose, iDigits)+",");
 WriteString("\n");
 }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
string GetPeriodName(){
   switch(Period()){
    
       case PERIOD_D1:  return("Day");
       case PERIOD_H4:  return("4_Hour");
       case PERIOD_H1:  return("Hour");
       case PERIOD_M1:  return("Minute");
       case PERIOD_M15: return("15_Minute");
       case PERIOD_M30: return("30_Minute");
       case PERIOD_M5:  return("5_Minute");
       case PERIOD_MN1: return("Month");
       case PERIOD_W1:  return("Week");
     }
  }

emeke Jul 23, 2019 5:58am | Post# 29900

1 Attachment(s)
Hi, {quote} Here are the signals that would be generated from what I understand to be your 2-MA, Stoch, Close-MA cross specification. Seems like a lot of thrashing during ranging market, which might need further suggestions/clarifications/considerations? Al {image}
you may have missed something.
please see the set up again belowClick to Enlarge

Name: set up z.png
Size: 82 KB

for a buy :
20 ma above 48 (red)
and the stoch's main line (blue) also leads the signal line (red) with both pairs of lines showing a general bearish trend.

Their respective crossovers may have happened much earlier.
Thanks


© Forex Factory