Coding help - page 716

 

mr mladen:

why on your chart you can see behind candle but on my chart i can't see behind candle?

 

 

 

 regard

Files:
 
bilbao:

mr mladen:

why on your chart you can see behind candle but on my chart i can't see behind candle?

 

 

 

 regard

Change the chart in foreground property of your chart to true
 

mladen:
Change the chart in foreground property of your chart t

REGARD 

 

mr mladen:

could you add alarm and arrow on it

best regard

it not repaint and difference with ehlrs fisher


Files:
 

mladen,

 

In mt5, is there any indicator that allows you to compare two assets on the same chart?

Something like the chart below. (compare asset1 GOAU4 and asset2 GGBR4)

 


 
baraozemo:

mladen,

 

In mt5, is there any indicator that allows you to compare two assets on the same chart?

Something like the chart below. (compare asset1 GOAU4 and asset2 GGBR4)

 


Did you try inserting chart objects (from the insert->objects->graphical->charts)?
 
mladen:
Did you try inserting chart objects (from the insert->objects->graphical->charts)?

in MT5 

insert > objects > graphics > "GRAPHICS"  (note: you don't have "charts" sub-menu inside graphics)

 

 you get new "sub-windows" inside the main graphic... but this is not the same as "plot" lines or candles inside the same window using another asset

 
baraozemo:

in MT5 

insert > objects > graphics > "GRAPHICS"  (note: you don't have "charts" sub-menu inside graphics)

 

 you get new "sub-windows" inside the main graphic... but this is not the same as "plot" lines or candles inside the same window using another asset

I know it is not the same. Even if you plot on the same chart, the values must be adjusted and the value of the "foreign" asset is going to be just a simple approximation that has nothing in common with real values. With sub-chart, at least that is not deformed as hell and you can chose any symbol and time frame
 

Hi,

 

My code has errors... something is wrong while converting "0" zero values...


I need to check time ranges, If it's not in range , result should be "OFF" (no TRADE period)

these inputs code works fine
StartHour1=9
StartMinute1=10
EndHour1=17
EndMinute1=30

But,these make the code FAILS
StartHour1=9
StartMinute1=0
EndHour1=17
EndMinute1=0 


//How I call it from "OnInit" 

 if ((StartHour1!=0) && (StartMinute1!=0)  && (EndHour1!=0) && (EndMinute1!=0)) //avoid all empty
      if (checktime(starttime(StartHour1,StartMinute1),endtime(EndHour1,EndMinute1)))
          {
          TradeON = true;
          Print ("trade1 on : "+TimeToString(TimeCurrent()));
          }
      else Print ("trade1 OFF: "+TimeToString(TimeCurrent()));

//the function checktime


datetime
starttime(uint starthour,uint startminute)
{ string currentdatestr=TimeToString(TimeCurrent(),TIME_DATE);
  string datetimenow=currentdatestr+" "+IntegerToString(starthour)+":"+IntegerToString(startminute)+":00";
  return StringToTime(datetimenow);
}
datetime endtime(uint endhour,uint endminute)
{ string currentdatestr=TimeToString(TimeCurrent(),TIME_DATE);
  string datetimenow=currentdatestr+" "+IntegerToString(endhour)+":"+IntegerToString(endminute)+":00";
  
  return StringToTime(datetimenow);
}

bool checktime(datetime start,datetime end)
  {
   Print (TimeToString(start)+" "+TimeToString(end));
   datetime dt=TimeCurrent();                          // current time
   if(start<end) if(dt>=start && dt<end) return(true); // check if we are in the range
   if(start>=end) if(dt>=start|| dt<end) return(true);
   return(false);
  }
 

hi mladen

               Please correct indicator as shown below.

                                                                          thanks




Files:
Reason: