Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1092

 
v0van1990:

This function gives me information about non-standard last formed fractals, and I change these non-standard fractals at the beginning of the EA.


This function gives me the value of indicator "takbir", I don't know what this indicator does.

v0van1990:

But I can't figure out how I can fix the following:

double StL=NormalizeDouble(Tupf,_Digits);
This function simply rounds off the value of "Tupf"
 
MakarFX:

This function gives the value of the "takbir" indicator, what this indicator does I don't know.

This function simply rounds "Tupf" value

The takbir indicator draws fractals and that's it...

I am solving a problem:

1) lower fractal is formed - after it, look for the highest high - if the price in the future is equal to or lower than the fractal price - sell - stop is set at the highest point between the fractal and sell

2) for buying - similarly, created a high - look for the lowest low - buy - stop behind the low

3) if the price hasn't been on a fractal - a new fractal is created - start a new cycle

 
v0van1990:

takbir indicator draws fractals and that's it...

This function

     {
      Tupf=iCustom(Symbol(),0,"takbir",Bars_left,Bars_right,0,i);
      if(Tupf>0)
         break;
     }
receives data from "takbir", if it is not what you want, you have to deal with "takbir".
 
MakarFX:

This function

gets data from "takbir", if it is not the same as you want, you have to deal with "takbir".

After the lower fractal the highest high and after the upper fractal the lowest low should I calculate in the indicator?

If I do it in the indicator, how? Fractal account and output indicator - with bar settings on the left and right

 

v0van1990:

If this is done in an indicator, how? Fractal account and output indicator - with bar settings on the left and right

You're asking about something I can't even see. I am not a telepath

 
Good afternoon!
I take a screenshot of my screen
string filename = "ChartScreenShot" + "CHART_OPEN" + ".png";
   bool scCapture = ChartScreenShot(0,filename,800,600,ALIGN_RIGHT);
   if (scCapture) 
    {
      PrintFormat("Take screenshot successful");
    } else {
      PrintFormat("Take screenshot failure");
    }
It's saved in standard way \MQL4\Files, but I need to resend this screenshot on some occasions! Can you tell me how to specify the path so that I can do it? Because I always get an error: The specified file could not be found.


 
MakarFX:

You're asking about something I can't even see. I'm not a telepath.

//+------------------------------------------------------------------+
//|                                                                  |
//|                 Copyright © 1999-2008, MetaQuotes Software Corp. |
//|                                         http://www.metaquotes.ru |
//+------------------------------------------------------------------+
#property copyright "© 2007 Takbir"
#property link      "www.stigal.com"
//----
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_width1  1
#property indicator_width2  1
//----
double UpperFr[];
double LowerFr[];
//----
int Bars_left=5;
int Bars_right=5;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void init()
  {
   SetIndexBuffer(0, UpperFr);
   SetIndexBuffer(1, LowerFr);
   //
   SetIndexEmptyValue(0, 0);
   SetIndexEmptyValue(1, 0);
   //
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 217);
   //
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexArrow(1, 218);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void start()
  {
   int counted_bars = IndicatorCounted();
   if(counted_bars < 0)  return(-1);
   if(counted_bars > 0)   counted_bars--;
   int limit = Bars - counted_bars;
   if(counted_bars==0) limit-=1+Bars_left;
//-----
   double dy=0;
     for(int i=1; i<=20; i++)
     {
      dy+=0.3*(High[i]-Low[i])/20;
     }
   for(i=1+Bars_right; i<=limit+Bars_left; i++)
     {
      UpperFr[i]=0;
      LowerFr[i]=0;
//----
      if (IsUpperFr(i)) UpperFr[i]=High[i] + dy;
      if (IsLowerFr(i)) LowerFr[i]=Low[i] - dy;
     }
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool IsUpperFr(int bar)
  {
   for(int i=1; i<=Bars_left; i++)
     {
      if (bar+i>=Bars) return(false);

      if (High[bar] < High[bar+i]) return(false);
     }
   for(i=1; i<=Bars_right; i++)
     {
      if (bar-i < 0) return(false);
      if (High[bar] < High[bar-i]) return(false);
     }
//----
   return(true);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool IsLowerFr(int bar)
  {
   for(int i=1; i<=Bars_left; i++)
     {
      if (bar+i>=Bars) return(false);
      if (Low[bar] > Low[bar+i]) return(false);
     }
   for(i=1; i<=Bars_right; i++)
     {
      if (bar-i < 0) return(false);
      if (Low[bar] > Low[bar-i]) return(false);
     }
//----
   return(true);
  }
//+------------------------------------------------------------------+

Sorry, here's the code for the indicator

 
ponochka:
Good afternoon!
I take a screenshot and it's saved to standard path \MQL4\Files, but I need to resend this screenshot on some occasions! Can you tell me how to specify the path so that I can do it? Because I always get an error: The specified file could not be found.


Read thefirst lines. Make conclusions.
Документация по MQL5: Файловые операции
Документация по MQL5: Файловые операции
  • www.mql5.com
Из соображений безопасности в языке MQL5 строго контролируется работа с файлами. Файлы, с которыми проводятся файловые операции средствами языка MQL5, не могут находиться за пределами файловой "песочницы". общая папка всех установленных на компьютере терминалов  – обычно расположена в каталоге C:\Documents and Settings\All Users\Application...
 
v0van1990:

Sorry, here is the code for the indicator

Your owl does everything as prescribed in the code.

If you want a stop not at the last fractal, then change the stop detection function.

Maybe you need iHighest iLowest.

 
MakarFX:

Where's the rest?

Expert.mqh>

SignalTRIX.mqh>


SignalStoch.mqh>

TrailingFixedPips.mqh>

MoneyFixedRisk.mqh>.

Sorry, I don't know what is where.

This? Where do I look for trailers and risk?!

Files:
Lift.mq5  9 kb
TRIX.mq5  4 kb
Reason: