any one help to fix this error in mq4 indicator code

 

i am 

try to make one indicator code  but in this get some error 


Files:
SMC.mq4  4 kb
 
ashish lokare:

i am 

try to make one indicator code  but in this get some error 


int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], 
    const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], 
    const int &spread[])
  
{
    double atr = iATR(NULL, 0, 50, 0);
    double swing_high = iCustom(NULL, 0, "Pivot High Low", swing_length, 0, 0);
    double swing_low = iCustom(NULL, 0, "Pivot High Low", swing_length, 1, 0);

    if (!DoubleIsNaN(swing_high))
    {
         ArrayCopySeries(swing_high_values, 0, 1, 4);
         swing_high_values[0] = swing_high;

        ArraySetAsSeries(supply_array, true);
        int bn = iBarShift(NULL, 0, swing_high);
        double poi = (swing_high + swing_low) / 2;
        bool okay_to_draw =  CheckOverlapping(poi, supply_array, atr);

     // Calculate the new supply zone
if (okay_to_draw)
{
    ArrayCopySeries(supply_array, 1, supply_array, 0, ArraySize(supply_array) - 1);
    ArrayResize(supply_array, ArraySize(supply_array) - 1);
    supply_array[0] = swing_high;
    ObjectCreate("SupplyZone", OBJ_RECTANGLE_LABEL, 0, bn, swing_high, bn + 100, swing_high - atr * box_width);
    ObjectSet("SupplyZone", OBJPROP_COLOR, supply_color);
    ObjectSet("SupplyZone", OBJPROP_STYLE, STYLE_SOLID);
    ObjectSet("SupplyZone", OBJPROP_WIDTH, 2);
}

    }

    // Implement the rest of the calculations similarly as above for the swing_low values and demand zones
    // ...

    if (show_zigzag)
    {
        int shift = 0;
        if (swing_high_values[0] >= swing_high_values[1])
        {
            shift = iBarShift(NULL, 0, swing_high_values[0]);
            ObjectCreate("ZigZag", OBJ_TREND, 0, shift, swing_high_values[0], shift + 1, swing_high_values[1]);
            ObjectSet("ZigZag", OBJPROP_COLOR, zigzag_color);
            ObjectSet("ZigZag", OBJPROP_STYLE, STYLE_SOLID);
            ObjectSet("ZigZag", OBJPROP_WIDTH, 2);
        }
        else if (swing_low_values[0] <= swing_low_values[1])
        {
            shift = iBarShift(NULL, 0, swing_low_values[0]);
            ObjectCreate("ZigZag", OBJ_TREND, 0, shift, swing_low_values[0], shift + 1, swing_low_values[1]);
            ObjectSet("ZigZag", OBJPROP_COLOR, zigzag_color);
            ObjectSet("ZigZag", OBJPROP_STYLE, STYLE_SOLID);
            ObjectSet("ZigZag", OBJPROP_WIDTH, 2);
        }
    }
    return(rates_total);
}

You still have errors but this is a start.

Next define your CheckOverlapping function.

 
can u give me more info how to fix this error 
 
ashish lokare #:
can u give me more info how to fix this error 
Place the cursor on ArrayCopySeries and press F1 you're getting right to the point where you find how to use the function.
 
can u fix this code and send me copy i will upload code also pls check 
 
ashish lokare #: can u fix this code and send me copy i will upload code also pls check 
  1. This is an international English forum; post in English on this part of the forums.  “u” is not a word. “pls” is not a word. “Check” what?
              Please don't write ur - it's “you are” or "your" - MQL4 programming forum (2014)

  2. Yes, we can, can you?

    Do not post code that will not even compile.
              MT4: Learn to code it.
              MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
              I need HEEEELP, please, it's URGENT...really ! - General - MQL5 programming forum (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)