Indicators: High and Low Custom levels

 

High and Low Custom levels:

High and Low. For levels, you can specify an offset. You can specify the interval (PERIOD_D1) on which to search for levels.

High and Low Custom levels of the current day

Author: Vladimir Karputov

 
Hi Vladimir, Can you help to get the high level and low level values to an EA? I tried ObjectGetDouble(0,"name_high",OBJPROP_PRICE,0) that doesn't seems to work? Thanks in advance.
 
ericy :
Hi Vladimir, Can you help to get the high level and low level values to an EA? I tried ObjectGetDouble(0,"name_high",OBJPROP_PRICE,0) that doesn't seems to work? Thanks in advance.

Show your MQL5 code - a code that can be compiled and run.

 
void OnTick()
{
     if(POS_n_BUYLIMIT + POS_n_SELLLIMIT + POS_n_BUY + POS_n_SELL == 0)
   {  
      TradedLot = StartingLot;      
      for(i=1;i<=NumberOfTrades;i++)
      { 
      RefreshRates();
      StartAskPrice = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
      StartBidPrice = SymbolInfoDouble(_Symbol,SYMBOL_BID); 
      double HighLevelPrice = ObjectGetDouble(0,"name_high",OBJPROP_PRICE,0);
      double  LowLevelPrice =  ObjectGetDouble(0,"name_low",OBJPROP_PRICE,0);
            
      bool sellZone; 
      if(StartAskPrice > HighLevelPrice) {sellZone = true;}
      else{(sellZone=false);}
      bool buyZone;
      if(StartBidPrice < LowLevelPrice) {buyZone = true;}
      else {(buyZone = false);}
     
      BuyPrice = StartBidPrice - FirstOrderFromMarket*_Point;
      SellPrice = StartAskPrice + FirstOrderFromMarket*_Point;
      double TradedBLevel = NormalizeDouble(BuyPrice - ((SpaceBetweenTrades * i)*_Point),_Digits);
      double TradedSLevel = NormalizeDouble(SellPrice + ((SpaceBetweenTrades * i)*_Point),_Digits);
      if(TradeLong && buyZone) 
      {
         }

 
ericy :

Sorry your code does not compile. I asked: I need the FULL code that I can run at home.

Attach the mql5 file to your post.

 
ericy :
***

Insert the code CORRECTLY! I can’t read SIMPLE TEXT. The code must be inserted CORRECTLY!

 

ok, thanks, attached is the mql5 file.

Files:
 
ericy :

ok, thanks, attached is the mql5 file.

Your code is bad. Your code contains 100 errors. Your code does not compile.

There is not a drop of code from my adviser in your code - why are you asking me if you show ANOTHER code ???

 
There should be another file MT4orders.mqh in the includes folder . I will attached it now.
 
ericy :
There should be another file MT4orders.mqh in the includes folder . I will attached it now.

You show me the ALIEN code. And you ask a question in the topic "Indicators: High and Low Custom levels".

Why are you showing the ALIEN code in the topic "Indicators: High and Low Custom levels"? You made a mistake with the topic.

 
yes, your code is inside the EA. Attached is the MT4orders.mqh.
Reason: