Coding help - page 786

 

hello , please help guys

This code is for opening trades after closing a candle, I want to modify the opening of trades after closing the candle by five pips

if(Open_Orders_TF &&(!Max_Spread_TF ||(Spread/Pointt)<=Max_Spread) && LastRealOOTM(Frame_MagicNumber)<ime[0])

thank you

 
Hey guys, can u pls help me with this indi. I tried to fix this with my limited knowledge of coding but couldnt do it. I need the arrow not to dissapear when it appears on candle.... 
Files:
Zeus.mq4  4 kb
 
Smudjan #:
Hey guys, can u pls help me with this indi. I tried to fix this with my limited knowledge of coding but couldnt do it. I need the arrow not to dissapear when it appears on candle.... 
Here is an updated version of the Zeus indicator with arrows showing the failed rsi (2) attempts on the chart, comments are in the code & images also attached. Enjoy!
Files:
 
Smudjan #: can u pls help me with this indi.

“u” is not a word. “pls” is not a word. “indi” is not a word.

This is an international English forum; Post in English.
          Please don't write ur - it's "you are" or "your" - MQL4 programming forum (2014)

 
Comments that do not relate to this topic, have been moved to "Spam".
 

Please see this request :


Request you to Please Add Option : USER INPUT SPACE(GAP) between Candles : ____ : Code / Logic to : Thick Wick Indicator.


Reason for this Request :

1) If we increase Candle size / increase Canlde size to 4 or more then there is no SPACE(GAP) left between each Candle. ***

   ( This Option will allow us to increase Candle width and have good Space/Gap between each Candle )

2) If this is done then we will get more Clear Candle / Bar Charts in MT4.

 

Attached are few pics to show how SPACE(GAP) between Candles make decent charts.


Thanks.

 
HELLO PLEASE I NEED HELP CONVERTING THIS CODE FROM MQL4 TO MQL5, PLEASE I BEG YOU. THANKS





//+------------------------------------------------------------------+
//|                                                Trend_Scalper.mq4 |
//|                        Copyright 2022, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

input double Lots = 0.1;

input int TenkanSen = 9;
input int KijunSen = 26;
input int SenkouSpanB = 52;



input string Commentary = "Comment";
input int Magic = 1;


int totalBars;


int OnInit(){

   totalBars = iBars(_Symbol,PERIOD_CURRENT);

   return(INIT_SUCCEEDED);
}


void OnDeinit(const int reason){

  
}


void OnTick(){


    int bars = iBars(_Symbol,PERIOD_CURRENT);
    if(totalBars != bars){
       totalBars = 2;
       
       double tenkanSen1 = iIchimoku(_Symbol,PERIOD_CURRENT,TenkanSen,KijunSen,SenkouSpanB,MODE_TENKANSEN,1);
       double kijunSen1 = iIchimoku(_Symbol,PERIOD_CURRENT,TenkanSen,KijunSen,SenkouSpanB,MODE_KIJUNSEN,1);
       double tenkanSen2 = iIchimoku(_Symbol,PERIOD_CURRENT,TenkanSen,KijunSen,SenkouSpanB,MODE_TENKANSEN,2);
       double kijunSen2 = iIchimoku(_Symbol,PERIOD_CURRENT,TenkanSen,KijunSen,SenkouSpanB,MODE_KIJUNSEN,2);
       double senkouSpanA = iIchimoku(_Symbol,PERIOD_CURRENT,TenkanSen,KijunSen,SenkouSpanB,MODE_SENKOUSPANA,1);
       double senkouSpanB = iIchimoku(_Symbol,PERIOD_CURRENT,TenkanSen,KijunSen,SenkouSpanB,MODE_SENKOUSPANB,1);
       
       if(tenkanSen1 > kijunSen1 && tenkanSen2 <= kijunSen2){
         Print("Buy Crossover...");
         
         for(int i = OrdersTotal()-1; i >= 0; i--){
            if(OrderSelect(i,SELECT_BY_POS)){
            if(OrderSymbol() == _Symbol && OrderMagicNumber() == Magic){
               if(OrderType() == OP_SELL){
                  if(OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Ask,_Digits),100000)){
                  Print("Closed pos #",OrderTicket());
                  
                  }
               }
            }
         
            }
         }
       
       
         if(Ask > senkouSpanA && Ask > senkouSpanB){
         double entry = Ask;
         entry = NormalizeDouble(entry,_Digits);
         
         int tickets = OrderSend(_Symbol,OP_BUY,Lots,entry,100000,0,0,Commentary,Magic);
         }
         
       }else if(tenkanSen1 < kijunSen1 && tenkanSen2 >= kijunSen2){
       Print("Sell Crossover...");
       
       for(int i = OrdersTotal()-1; i >= 0; i--){
            if(OrderSelect(i,SELECT_BY_POS)){
            if(OrderSymbol() == _Symbol && OrderMagicNumber() == Magic){
               if(OrderType() == OP_BUY){
                  if(OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,_Digits),100000)){
                  Print("Closed pos #",OrderTicket());
                  
                  }
               }
            }
         
            }
         }
     
       
       if(Bid < senkouSpanA && Bid < senkouSpanB){
       double entry = Bid;
         entry = NormalizeDouble(entry,_Digits);
         
         int tickets = OrderSend(_Symbol,OP_SELL,Lots,entry,100000,0,0,Commentary,Magic);
         }
       }
    }  
}
 
Hi can someone help me out please is that possible to stop buffer with time . Like if it appear late like about 30second or one minute it should not be appear with arrow or if it comes in time then it should work ?
 
rocktheedge #: . Like if it appear late like about 30second or one minute it should not be appear with arrow
  1. What if there are no ticks during a specific candle period? There can be minutes between ticks during the Asian session.
  2. Generally, you shouldn't be looking at the forming candle (bar zero) since any signal (arrow) may come and go as price changes during the candle. Wait for a new bar to start and look at bar one for your signal.
 
rocktheedge #:
I am talking about signal of current candle mostly indicator appear on open price but the problem is they appear after a few second and some delayed like about more than 40 second . I want them not to be appear if they are late like about more than 30 second ..
Reason: