learning mql5

//----

much better......

when the count is >= 15 of the 17 possible signals, it returns current valid counts and bought it all or sold it all.......

this assures knowing that the timeframe is effectively maxed out......

paints a clearer picture and eliminates any possible confusion with gray......h
//------
View attachment 33701
MYMU25 1 buy jfatl 4

What is the value of the “4” here? I can see that there are four signals that are currently on their open bar.

Do you wait until there is only so much time left in the bar close to act on the signal, to avoid being faked out and the signal going away?

Also, are you buying a contract per signal, or do you only want to enter trades on the first “X” signals of a timeframe, to avoid getting in late?
 
Last edited:
MYMU25 1 buy jfatl 4

What is the value of the “4” here? I can see that there are four signals that are currently on their open bar.
//-----

another good catch........ yes....... MYMU25 1 buy jfatl 4 means there is a jfatl buy signal along with 3 others.......

the initiating signal will only last for 1 bar of that time frame it occurs...... just like a expert advisor buying when the macd crosses the 0 line...... it will place 1 trade..... after that the macd is above 0......

or say the price moves above the psar...... on that bar a expert might place a trade......

only new signals are blue or magenta....... the next bar they will be lime or red...... or yellow......
//------

so think about that...... if the 60, 240 and 1440 are all saying buy, wouldn't it better to watch the lower timeframes for buys.......

the possibility of fake outs do exist but they are of no concern to me......

on a 50k account my contract size is typically 1 micro...... if there are 7 signals on the 1 minute bar and 9 on the 5 minute bar, it's still 1.......

on a 150k account my contract size is typically 2 micros...... if there are 7 signals, it's still typically 2.......
//-----

as far as being late.......

how many times will the 1 minute psar signal occur during the day....... how many times will the 1 minute alma color change during the day......

how many times will the 5 minute psar signal occur during the day....... how many times will the 5 minute alma color change during the day......

how many times will the 15 minute psar signal occur during the day....... how many times will the 15 minute alma color change during the day......

you know those numbers.......

you know those numbers today for every single day next month......

why would i worry about being late for a trade on the 1 minute chart......

i'm more worried about that darn pig pushing my deer feeder over........ and i can tell you today where he will be next week.......h
//------

Screenshot 2025-07-22 185655.png
//--------

image000001.jpg

//--------

image000000.jpg
 
I may still be learning how to apply counts into financial markets, but I have learned other counts...

Like what comes after son #4 (and almost in the car on the way to the midwife)!... it would seem my average count for boys must at least be above 5

I suppose "Bought it all 16" on a 1hour could at least provide a bit of guidance on whether you are getting close to buying the top on the 1min...
 
I suppose "Bought it all 16" on a 1hour could at least provide a bit of guidance on whether you are getting close to buying the top on the 1min...
//------

i might not be clear what your saying....... but in a sense yes.......

all it really means is the 16 buy signals on the 60 chart have occurred..... so for example, if you know the average alma length, you could do the math..... if the alma has been lime for 5 hours, it might be time to take a break.......

roughly speaking, there is a predictable number of 1 minute signals in every 1440 minute bar...... same can be said for comparing all signals and all timeframes.......

take a chart in a 60 minute uptrend........ look at the 1 minute chart....... place a vertical line every time the stochastic(10,3,6) fell into the single digits......

now leaving the lines as is, move up to the 5...... 15....... 30, 60...... you can see the 1 minute signals density on each timeframe.....

i used to have peyton build 7 level signal pyramids with 1440 being the top ..... 1 minute being the bottom with 2x2 colored blocks.....

if the 1440 alma was lime, the top block would be lime........ she would count every buy signal that occurred during that day on lower time frames and build the pyramids...... there are more complex versions than just a single signal......

put those kids to work...... have them build those pyramids....... let them color the blocks......h
//------

Screenshot 2025-07-30 233733.png
//--------

Screenshot 2025-07-30 233900.png
//--------

Screenshot 2025-07-30 233930.png
//--------

Screenshot 2025-07-30 233956.png
 
roughly speaking, there is a predictable number of 1 minute signals in every 1440 minute bar...... same can be said for comparing all signals and all timeframes.......
//-----

the 1440, 240 and 60 often gives some protection to lower tfs.......

taking only signals/colors on lower tfs that agree with colors on high tfs seems more productive......

saves on band-aids also........h
//--------



MQL5:
        if(jfatl)
        {
        if((a[i] > a[i-1]))   colors[i] = 0.0;
 
        if((a[i] < a[i-1]))   colors[i] = 1.0;
        }
 
        if(fifty)
        {
        if((b[i] > b[i-1]))   colors[i] = 0.0;
 
        if((b[i] < b[i-1]))   colors[i] = 1.0;
        }
 
        if(hundred)
        {
        if((c[i] > c[i-1]))   colors[i] = 0.0;
 
        if((c[i] < c[i-1]))   colors[i] = 1.0;
        }
 
 
        if(hma)
        {
        if((e[i] > e[i-1]))   colors[i] = 0.0;
 
        if((e[i] < e[i-1]))   colors[i] = 1.0;
        }
 
 
        if(jjma)
        {
        if((f[i] > f[i-1]))   colors[i] = 0.0;
 
        if((f[i] < f[i-1]))   colors[i] = 1.0;
        } 
 
 
 
        if(alma)
        {
        if((g[i] > g[i-1]))   colors[i] = 0.0;
 
        if((g[i] < g[i-1]))   colors[i] = 1.0;
        }
 
 
        if(coppock)
        {
        if((h[i] > h[i-1]))   colors[i] = 0.0;
 
        if((h[i] < h[i-1]))   colors[i] = 1.0;
        }     
 
 
 
     }
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

//-----

Screenshot 2025-08-02 021218.png
 
Last edited:
added obj_label label....... and objectcreate......

to show indicator which colors are based on........h

//-----

Screenshot 2025-08-02 163541.png

//------

MQL5:
//--- get handles
 
   ahandle  =  iCustom(_Symbol,Period(),"jfatl");                            
   bhandle  =  iMA(_Symbol,PERIOD_CURRENT,50,0,MODE_SMA,PRICE_CLOSE);
   chandle  =  iMA(_Symbol,PERIOD_CURRENT,100,0,MODE_SMA,PRICE_CLOSE);
   dhandle  =  iCustom(_Symbol,Period(),"vidyas");
   ehandle  =  iCustom(_Symbol,Period(),"hma",10,2.0);
   fhandle  =  iCustom(_Symbol,Period(),"jjma");
   ghandle  =  iCustom(_Symbol,Period(),"alma");
   hhandle  =  iCustom(_Symbol,Period(),"Coppock"); 
//   ihandle  =                                                                                
   jhandle  =  iCustom(_Symbol,Period(),"fatl");                                                                                 
   khandle  =  iCustom(_Symbol,Period(),"satl");                                                                              
   lhandle  =  iCustom(_Symbol,Period(),"TRIX",20);                                                                        
   mhandle  =  iCustom(_Symbol,Period(),"Spear");                                                                            
   nhandle  =  iTEMA(_Symbol,Period(),20,0,PRICE_CLOSE);                                                                            
   ohandle  =  iDEMA(_Symbol,Period(),20,0,PRICE_CLOSE);                                                                              
   phandle  =  iAO(_Symbol,Period());                                                                            
   qhandle  =  iStochastic(_Symbol,Period(), 10, 3, 6, MODE_SMA, STO_CLOSECLOSE);                                                                        
   rhandle  =  iCustom(_Symbol,Period(),"hma",89,2.0);  
//----
 
   string chosen = "";
 
   if(jfatl)       {chosen = "jfatl";}
   if(fifty)       {chosen = "fifty";} 
   if(hundred)     {chosen = "hundred";}
   if(vidyas)      {chosen = "vidyas";}  
   if(hma)         {chosen = "hma";}
   if(jjma)        {chosen = "jjma";}
   if(alma)        {chosen = "alma";}
   if(coppock)     {chosen = "coppock";}    
   if(fatl)        {chosen = "fatl";}    
   if(satl)        {chosen = "satl";} 
   if(trix)        {chosen = "trix";} 
   if(spearman)    {chosen = "spearman";} 
   if(tema)        {chosen = "tema";}
   if(dema)        {chosen = "dema";}    
   if(ao)          {chosen = "ao";} 
   if(stochastic)  {chosen = "stochastic";} 
   if(hma89)       {chosen = "hma89";}
//---- 
 
   Display("choice");  
   ObjectSetText("choice", chosen ,12,"Verdana", clrAqua);
 
 
  }

//-----

MQL5:
void ObjectSetText(const string name, const string text, const int size, string font = NULL, color clr = clrNONE)
{
    ObjectSetString(0,  name, OBJPROP_TEXT, text);
    ObjectSetInteger(0, name, OBJPROP_FONTSIZE, size);
    ObjectSetString(0,  name, OBJPROP_FONT, font);
    ObjectSetInteger(0, name, OBJPROP_COLOR, clr);
    ObjectSetInteger(0, name, OBJPROP_BACK, true);
}
 
 
 void Display(string name)
      {
      ObjectCreate(0,name, OBJ_LABEL,ChartWindowFind(ChartID(), shortname), 0, 0, 0);
      ObjectSetInteger(0,name, OBJPROP_CORNER, 0);
      ObjectSetInteger(0,name, OBJPROP_XDISTANCE, 50);
      ObjectSetInteger(0,name, OBJPROP_YDISTANCE, 50);
      }
 
Last edited:
thanks to enivid, .....

now feel comfortable saying any reasonable indicator can be made into a multi timeframe indicator in less than 1 minute......

and 2 indicators might be able to contain them all ....

one for indicators applied to main chart window and a second for those needing their own window.......h
//--------

MQL5:
//--- get a user selected indicator for "ahandle".......   this allows mtf conversion for all.......
 
   if(jfatl)       ahandle  =  iCustom(_Symbol,timeframe,"jfatl");                          
   if(fifty)       ahandle  =  iMA(_Symbol,timeframe,50,0,MODE_SMA,PRICE_CLOSE);
   if(hundred)     ahandle  =  iMA(_Symbol,timeframe,100,0,MODE_SMA,PRICE_CLOSE);
   if(vidyas)      ahandle  =  iCustom(_Symbol,timeframe,"vidyas");
   if(hma)         ahandle  =  iCustom(_Symbol,timeframe,"hma",10,2.0);
   if(jjma)        ahandle  =  iCustom(_Symbol,timeframe,"jjma");
   if(alma)        ahandle  =  iCustom(_Symbol,timeframe,"alma");            
   if(coppock)     ahandle  =  iCustom(_Symbol,timeframe,"Coppock");// needs to be in a second window version       
//   ihandle  =                                                                              
   if(fatl)        ahandle  =  iCustom(_Symbol,timeframe,"fatl");                                                                                
   if(satl)        ahandle  =  iCustom(_Symbol,timeframe,"satl");                                                                            
   if(trix)        ahandle  =  iCustom(_Symbol,timeframe,"TRIX",20);                                                                      
   if(spearman)    ahandle  =  iCustom(_Symbol,timeframe,"Spear");                  // needs to be in a second window version                                                               
   if(tema)        ahandle  =  iTEMA(_Symbol,timeframe,20,0,PRICE_CLOSE);                                                                          
   if(dema)        ahandle  =  iDEMA(_Symbol,timeframe,20,0,PRICE_CLOSE);                                                                            
   if(ao)          ahandle  =  iAO(_Symbol,timeframe);                   // needs to be in a second window version                                                              
   if(stochastic)  ahandle  =  iStochastic(_Symbol,timeframe, 10, 3, 6, MODE_SMA, STO_CLOSECLOSE);  // needs to be in a second window version                                                
   if(hma89)       ahandle  =  iCustom(_Symbol,timeframe,"hma",89,2.0);
//----

//-------

Screenshot 2025-08-03 130317.png

//-----

Screenshot 2025-08-03 131654.png
 
Last edited:
  • 👍
Reactions: Enivid
august to do list.......

a... decide on best manner to weight timeframes......

b.... decide on best manner to weight each indicators current condition by time frame......

c.... decide on best manner to sum the total time weighted results......

//---------------------------------------------------

  • The relative conceptual importance of indicators: is indicator A more, less, or equally important to indicator B? chapter 11 weighting.......
//-------

Before, we agreed that an indicator is a number....... calculate metrics......

//--------

//-------
a equal weight approach....... where each timeframes weight was 1...... if alma is rising on all 7 timeframes the value would be 7....... if 5 were rising and 2 falling, value would be 5....... if 7 were falling the value would be -7....

hard to see that working...... surely the 30 minute chart should carry more weight than the 1 minute......h
 
Last edited:
early wrote a script to export to excel various symbol properties...... you might not have excel......

can't remember how far i went with it....... for sure i quickly grew tired of having to update the symbols..... futures symbols change so often.....

wrote a script, goes in scripts folder, today that does similar but places it on a chart...... bit easier...... it uses all the symbols in the market data window......

written to fit my monitors...... might not fit yours.....

works best on a blank template.....

have some ideas to improve it......h

//------

Screenshot 2025-08-19 101716.png
 

Attachments

  • 👍
Reactions: Enivid
might be redundant loops......

still testing......h

//------

Screenshot 2025-08-19 141041.png

//--------



MQL5:
//------
//------
 
 void signals()
 {
 
  ENUM_TIMEFRAMES tf[]   = {PERIOD_M1, PERIOD_M5, PERIOD_M15, PERIOD_M30, PERIOD_H1, PERIOD_H4, PERIOD_D1};  //PERIOD_M1, PERIOD_M2, PERIOD_M3, PERIOD_M4,
 
  string tfs[14]         = {"1", "5", "15", "30", "60", "240", "1440"};   //"1","2","3","4",
 
 
  int total=SymbolsTotal(true)-1;
 
       int    bars    = 0;
 
       int    stoch[14];
       double alma[14];
       double coppock[14];
       double hma[14];
 
 
 
    for(int i = 0; i < total; i++)
      { 
 
       string symbol = SymbolName(i,true);     
 
       Display(symbol, 10, 100+(i*50));                 
       ObjectSetText(symbol, symbol, 10, "Verdana", clrAqua);
//----       
 
 
    for(int j = 0; j < 7; j++)
      { 
 
      alma[j]     = iCustom(symbol,tf[j],"alma");
      coppock[j]  = iCustom(symbol,tf[j],"Coppock");
      hma[j]      = iCustom(symbol,tf[j],"hma",10,2.0);
      stoch[j]    = iStochastic(symbol,tf[j], 10, 3, 6, MODE_SMA, STO_CLOSECLOSE); 
 
      bars        = iBars(symbol,tf[j]);
 
      }  //-----    for(int j = 0; j < 7; j++)
 
 
    for(int k = 0; k < 7; k++)
      { 
 
 
        double almas[];
 
        ArraySetAsSeries(almas,true);   
 
        CopyBuffer(alma[k],0,0,20,almas);
//----
 
        double coppocks[];
 
        ArraySetAsSeries(coppocks,true);   
 
        CopyBuffer(coppock[k],0,0,20,coppocks);
//----
 
        double hmas[];
 
        ArraySetAsSeries(hmas,true);   
 
        CopyBuffer(hma[k],0,0,20,hmas);
//----       
 
        double stochs[];
 
        ArraySetAsSeries(stochs,true);   
 
        CopyBuffer(stoch[k],0,0,4,stochs);
 
 
//------                                                                                 5 conditions
            color clr = clrYellow;
 
 
            if((almas[1] > almas[2]) && (hmas[1] > hmas[2]) && ((stochs[1] < 80.0) && (stochs[1] > 20.0) && (stochs[1] > stochs[2])))  { clr = clrAqua;   }  
 
            if((almas[1] < almas[2]) && (hmas[1] < hmas[2]) && ((stochs[1] > 20.0) && (stochs[1] < 80.0) && (stochs[1] < stochs[2])))  { clr = clrMagenta;}  
 
 
 
 
               Display(symbol+tfs[k],  300+(k*50), 100+(i*50));                     // Display(symbol+tfs[k],  1900+(k*50), 100+(i*50));         
               ObjectSetText(symbol+tfs[k], "ÛÛ",10,"Terminal", clr);
               ObjectSetString(0, symbol+tfs[k], OBJPROP_TOOLTIP, symbol+"  "+IntegerToString(tfs[k]));                               
 
 
 
        }  //-----  for(int k = 0; k < 7; k++)
//----
 
 
 
       }   //-----      for(int i = 0; i < total; i++)
 
 
   }  //-- void signals
 
changed it up a bit......

yellow unknown...... aqua up....... magenta down....... blue early up....... red early down......

might go into new york mixed...... should be lopsided real quick.......h
//-----

Screenshot 2025-08-20 060857.png
//-----

MQL5:
//------
//------
 
 void signals()
 {
 
  ENUM_TIMEFRAMES tf[]   = {PERIOD_M1, PERIOD_M5, PERIOD_M15, PERIOD_M30, PERIOD_H1, PERIOD_H4, PERIOD_D1};  //PERIOD_M1, PERIOD_M2, PERIOD_M3, PERIOD_M4,
 
  string tfs[14]         = {"1", "5", "15", "30", "60", "240", "1440"};   //"1","2","3","4",
 
 
  int total=SymbolsTotal(true)-1;
 
 
       int stoch[14];
       int alma[14];
       int coppock[14];
       int hma[14];
       double almas[];
       double coppocks[];
       double hmas[];
       double stochs[];
 
    for(int i = 0; i < total; i++)
      { 
 
       string symbol = SymbolName(i,true);     
 
       Display(symbol, 10, 100+(i*50));                 
       ObjectSetText(symbol, symbol, 10, "Verdana", clrAqua);
//----       
 
 
    for(int j = 0; j < 7; j++)
      { 
 
      alma[j]     = iCustom(symbol,tf[j],"alma");
      coppock[j]  = iCustom(symbol,tf[j],"Coppock");
      hma[j]      = iCustom(symbol,tf[j],"hma",10,2.0);
      stoch[j]    = iStochastic(symbol,tf[j], 10, 3, 6, MODE_SMA, STO_CLOSECLOSE); 
 
 
 
        ArraySetAsSeries(almas,true);   
 
        CopyBuffer(alma[j],0,0,20,almas);
//----
 
        ArraySetAsSeries(coppocks,true);   
 
        CopyBuffer(coppock[j],0,0,20,coppocks);
//----
 
        ArraySetAsSeries(hmas,true);   
 
        CopyBuffer(hma[j],0,0,20,hmas);
//----       
 
 
        ArraySetAsSeries(stochs,true);   
 
        CopyBuffer(stoch[j],0,0,4,stochs);
//----             
 
       color clr = clrYellow;
 
 
            if((almas[0] > almas[1]) && (hmas[0] > hmas[1]) && ((stochs[0] > 10.0) && (stochs[0] < 90.0) && (stochs[0] > stochs[1])))  {clr = clrAqua;} 
 
            if((almas[0] < almas[1]) && (hmas[0] < hmas[1]) && ((stochs[0] < 90.0) && (stochs[0] > 10.0) && (stochs[0] < stochs[1])))  {clr = clrMagenta;} 
 
 
 
            if((almas[0] > almas[1]) && (hmas[0] > hmas[1]) && ((stochs[0] < 30.0) && (stochs[0] > stochs[1])))                        {clr = clrBlue;} 
 
            if((almas[0] < almas[1]) && (hmas[0] < hmas[1]) && ((stochs[0] > 70.0) && (stochs[0] < stochs[1])))                        {clr = clrRed;} 
 
 
 
               Display(symbol+tfs[j],  300+(j*50), 100+(i*50));                     // Display(symbol+tfs[k],  1900+(k*50), 100+(i*50));         
               ObjectSetText(symbol+tfs[j], "ÛÛ",10,"Terminal", clr);
               ObjectSetString(0, symbol+tfs[j], OBJPROP_TOOLTIP, symbol+"  "+IntegerToString(tfs[j]));                               
 
 
 
        }  //-----  for(int k = 0; k < 7; k++)
//----
 
       }   //-----  for(int i = 0; i < total; i++)
 
 
   }       //----   void signals()
 
projects......

the polarity function below will print out the 24 hours and a initially gray box......

at the risk of ridicule..... the goal is to track each hour of the day in which a single order was closed with a targeted amount...... if so, the box color can be changed to lime or something.....

done manually at first...... later to be done in a hands free automatic method......

expansion of this idea is expected.......h

//-----

MQL5:
 void polarity()
  {
//---
 datetime    time    = TimeCurrent();
 MqlDateTime tm      = {};
 int         hours   = 24;
 
 
 for(int i=0;i<hours;i++)
    {
 
     Display(i, 10, 95+(i*50));                         
     ObjectSetText(i, i+1,10,"Verdana", clrLime);
     ObjectSetString(0, i, OBJPROP_TOOLTIP, "hour");                               
 
 
     Display(tm.day_of_year +" "+i, 100, 100+(i*50));                         
     ObjectSetText(tm.day_of_year +" "+i, "ÛÛ",10,"Terminal", clrGray);
     ObjectSetString(0, tm.day_of_year +" "+i, OBJPROP_TOOLTIP, "change color");                               
 
 
    }
 
  }
 
timetostrut...... order_time_done.....

code below returns the day of year, day of week, day, and hour of closed ticket.....

now need to cycle thru history to verify at least one per hour closed at or above target.....

there is a point to all this.......h

//-------

MQL5:
void OnStart()
  {
//---
 
  polarity();
 
  Print(OrderCloseTime(3100198511));
 
  datetime closed =  OrderCloseTime(3100198511);
 
   MqlDateTime dt_struct;                           // Declare a variable of type MqlDateTime
 
   TimeToStruct(closed, dt_struct);                 // Convert datetime to MqlDateTime structure
 
   int hour       = dt_struct.hour;                       // Access the 'hour' member of the structure
   int day        = dt_struct.day;                        // Access the 'day' member of the structure
   int dayofweek  = dt_struct.day_of_week;                // Access the 'day of week' member of the structure
   int dayofyear  = dt_struct.day_of_year;                // Access the 'day of year' member of the structure
 
   Print("closed day of year: ", dayofyear + "  closed day of week: ", dayofweek + "  closed day: ", day + "  closed hour: ", hour);
 
 
  }
//+------------------------------------------------------------------+
 
datetime OrderCloseTime(const ulong Ticket)
{
  return((HistoryOrderGetInteger(Ticket, ORDER_TICKET) == Ticket) || HistoryOrderSelect(Ticket) ? (datetime)HistoryOrderGetInteger(Ticket, ORDER_TIME_DONE) : 0);
}
 
objprop_selectable.......

goal is..... once object selected it would be possible to edit the text...... then local alert or push notification if price was above or below your preset value......h
//-----

MQL5:
//----
 
 void Display(string name, int x, int y)
      {
      ObjectCreate(0,name, OBJ_LABEL,0, 0, 0, 0);   
      ObjectSetInteger(0,name, OBJPROP_CORNER, 0);
      ObjectSetInteger(0,name,OBJPROP_SELECTABLE,true);   //  https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_text
      ObjectSetInteger(0,name, OBJPROP_XDISTANCE, x);
      ObjectSetInteger(0,name, OBJPROP_YDISTANCE, y);
      }

//----



Screenshot 2025-08-26 095432.png
 
objprop_selectable.......

goal is..... once object selected it would be possible to edit the text...... then local alert or push notification if price was above or below your preset value......h
//-----
//----

editing the text seems the best approach ...... having trouble with the code.....

so for now standard inputs......h
//------

MQL5:
input double a_ua = 0.0;  // audusd
input double a_ub = 0.0;  // audusd
input double b_ua = 0.0;  // gbpusd
input double b_ub = 0.0;  // gbpusd
input double c_ua = 0.0;  // usdcad
input double c_ub = 0.0;  // usdcad
input double e_ua = 0.0;  // eurusd
input double e_ub = 0.0;  // eurusd
input double j_ua = 0.0;  // usdjpy inverted
input double j_ub = 0.0;  // usdjpy inverted
input double n_ua = 0.0;  // nzdusd
input double n_ub = 0.0;  // nzdusd
input double s_ua = 0.0;  // usdchf
input double s_ub = 0.0;  // usdchf
 
 
      double above[30] = {a_ua, b_ua, c_ua, e_ua, j_ua, n_ua, s_ua};
      double below[30] = {a_ub, b_ub, c_ub, e_ub, j_ub, n_ub, s_ub};
//------
 
 
 void alerts()
     {
     int total=SymbolsTotal(true);
 
     for(int i = 0; i < total; i++)
      {       
       string symbol = SymbolName(i,true);
 
     if((above[i] != 0.0) && (SymbolInfoDouble(symbol,SYMBOL_ASK) > above[i]))  {Alert(symbol+" is above level");}
     if((below[i] != 0.0) && (SymbolInfoDouble(symbol,SYMBOL_BID) < below[i]))  {Alert(symbol+" is below level");} 
 
 
      }
 
    }
 
using buffered arrows........

plot_arrow_shift is +/- in pixels......h

//-----

MQL5:
#property indicator_label2  "ups"
#property indicator_type2   DRAW_ARROW
#property indicator_color2  clrAqua
#property indicator_width2  5
 
#property indicator_label3  "dns"
#property indicator_type3   DRAW_ARROW
#property indicator_color3  clrMagenta
#property indicator_width3  5
 
 
//-----
 
 
   SetIndexBuffer(1,ups,INDICATOR_DATA);
   PlotIndexSetInteger(1,PLOT_ARROW,241);
   PlotIndexSetInteger(1,PLOT_ARROW_SHIFT,50);   //  https://www.mql5.com/en/docs/customind/indicators_examples/draw_arrow 
   PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,0);
//---
 
   SetIndexBuffer(2,dns,INDICATOR_DATA);
   PlotIndexSetInteger(2,PLOT_ARROW,242);
   PlotIndexSetInteger(2,PLOT_ARROW_SHIFT,-50);  // https://www.mql5.com/en/docs/customind/indicators_examples/draw_arrow
   PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0);   
 
   //-----
 
 
     for(int j=rates_total-1;j>0;j--)     
     {   
      if(satls[j] > satls[j-1])   // comparing doubles can be dicey
      {
       ups[j] =  low[j];                // ObjectCreate(0,"up"+IntegerToString(j),OBJ_ARROW_BUY,0,time[j],low[j]);                                                                                                 
      }                                 // ObjectSetInteger(0,"up"+IntegerToString(j),OBJPROP_COLOR,clrAqua);
 
      if(satls[j] <= satls[j-1])
      {
       dns[j] = high[j];                //  ObjectCreate(0,"dn"+IntegerToString(j),OBJ_ARROW_SELL,0,time[j],high[j]);                                                                                                     
      }                                 //  ObjectSetInteger(0,"dn"+IntegerToString(j),OBJPROP_COLOR,clrMagenta); 
 
 
     }

//------

Screenshot 2025-08-31 004031.png
 
for comparison of signals or plain arrows it appears best to use the plot arrow shift......

in the case of a single indicator which offers the choice of many individual indicators, the plot arrow shift can be value can be unique to each contained indicator.......

this way the shifts can be staggered to avoid arrows sitting on top each other......

here only the alma, hma and satl were used...... that list can be expanded to include oscillators such as rsi, stochastic and such.......

appears safer swimming with the crowd.......

not against them......h

//---------

MQL5:
//--- indicator buffers mapping
 
   if(satl)
   {
   SetIndexBuffer(0,satls,INDICATOR_DATA);   
   //ArraySetAsSeries(satls,true);
   shift = 50;                                                                // shift unique to each coice to avoid arrows from stepping on each other.....
 
   }
 
   if(alma)
   {
   SetIndexBuffer(0,almas,INDICATOR_DATA);   
   //ArraySetAsSeries(almas,true);
    shift = 75;
 
    }
 
   if(hma)
   {
   SetIndexBuffer(0,hmas,INDICATOR_DATA);   
   //ArraySetAsSeries(hmas,true);
   shift = 100;
 
   }
 
   hmahandle  = iCustom(_Symbol,_Period,"hma",20,2.0);         
   almahandle  = iCustom(_Symbol,_Period,"alma");     
   satlhandle  = iCustom(_Symbol,_Period,"satl");     
 
 
//--- indicator buffers mapping
   SetIndexBuffer(1,ups,INDICATOR_DATA);
   PlotIndexSetInteger(1,PLOT_ARROW,241);
   PlotIndexSetInteger(1,PLOT_ARROW_SHIFT,shift);   //  https://www.mql5.com/en/docs/customind/indicators_examples/draw_arrow 
   PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,0);
//---
 
   SetIndexBuffer(2,dns,INDICATOR_DATA);
   PlotIndexSetInteger(2,PLOT_ARROW,242);
   PlotIndexSetInteger(2,PLOT_ARROW_SHIFT,-shift);  // https://www.mql5.com/en/docs/customind/indicators_examples/draw_arrow
   PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0);



Screenshot 2025-08-31 082448.png
 
even if metatrader reduces it down to only 4 kindergarten colors, a hayseed will always trade like a hayseed......

selling when the stochastic is below 10 on multiple timeframes is a poor way to do business...... i mean really...... how much lower than 4 can it go......

first loss in 2 weeks...... can't blame anyone but myprekindergarten self......

go sit in the corner.....h
//-------

Screenshot 2025-09-04 103035.png

//------

Screenshot 2025-09-04 101959.png

//-----

MQL5:
            color clr = clrYellow;
 
 
            if((stochs[0] < 90.0) && (stochs[0] > 10.0) && (stochs[0] > stochs[1]))  { clr = clrAqua;   }  //  
 
            if((stochs[0] > 10.0) && (stochs[0] < 90.0) && (stochs[0] < stochs[1]))  { clr = clrMagenta;}  //  
 
            if((stochs[0] < 10.0))  { clr = clrRed; }
 
            if((stochs[0] > 90.0))  { clr = clrBlue;}
 
            double stv = stochs[0];
 
               Display(symbol+tfs[k]+"stoch",  1500+(k*50), 100+(i*50));                     // Display(symbol+tfs[k],  1900+(k*50), 100+(i*50));      
               ObjectSetText(symbol+tfs[k]+"stoch", "ÛÛ",10,"Terminal", clr);
               ObjectSetString(0, symbol+tfs[k]+"stoch", OBJPROP_TOOLTIP, symbol+" stoch "+IntegerToString(tfs[k])+" "+DoubleToString(stv,2));