//+------------------------------------------------------------------+ //| pcg_random_bitmap.mq5 | //| Copyright © 2018, Amr Ali | //| https://www.mql5.com/en/users/amrali | //+------------------------------------------------------------------+ #include #include //--- the random number generator object CRandom pcg; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- hide the price chart ChartSetInteger(0,CHART_SHOW,false); //--- generate a bitmap of the random variable string name="MyBitmap"; int width=512; int height=512; CCanvas can; //--- can.CreateBitmapLabel(name,0,0,width,height,COLOR_FORMAT_XRGB_NOALPHA); can.FillRectangle(0,0,width,height,XRGB(255,255,255)); for (int y=0; y