Hey,
Is it possible to move a canvas i.e 30 pixel down with a for loop?
I have tried to search the internet, but nothing usefull came up.
I have tried with some code, but it ain't working
Thanks!
Is it possible to move a canvas i.e 30 pixel down with a for loop?
I have tried to search the internet, but nothing usefull came up.
I have tried with some code, but it ain't working
Inserted Code
//+------------------------------------------------------------------+
//| FilledRectangle.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
#property indicator_chart_window
#include <Canvas\Canvas.mqh>
CCanvas canvas;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
for( int xcount=15; xcount<=60; xcount++)
{
canvas.CreateBitmapLabel("canvas", 15, xcount, 300, 250, COLOR_FORMAT_ARGB_NORMALIZE);
canvas.Erase(ColorToARGB(clrBlack, 255));
//canvas.Rectangle(5,5,295,245,ColorToARGB(clrWhite,255));
//canvas.FontSet("Calibri", -210);
//canvas.TextOut(0, 0, "Text", ColorToARGB(clrWhiteSmoke, 255));
canvas.Update(true);
}
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator de-initialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
canvas.Destroy();
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],
const double &low[],const double &close[],const long &tick_volume[],const long &volume[],const int &spread[])
{
return(rates_total);
}
//+------------------------------------------------------------------+ Thanks!
Blindly following others will make you blind!