Help with error message PLEASE!

 
void watermark()

{

ObjectCreate("fxfisherman", OBJ_LABEL, 0, 0, 0);

ObjectSetText("fxfisherman", "fxfisherman.com", 11, "Lucida Handwriting", RoyalBlue);

ObjectSet("fxfisherman", OBJPROP_CORNER, 2);

ObjectSet("fxfisherman", OBJPROP_XDISTANCE, 5);

ObjectSet("fxfisherman", OBJPROP_YDISTANCE, 10);

return(0);

}

I used fxfisherman's format and put this coding using the name of my ea instead of fxfisherman at the bottom of my ea.

When I compile the ea program again I get an error: Function "watermark" is not referenced and will be removed from exp-file.

Can you help me with this problem???

Thanks in Advance!!!

Dave

<<<
 

Error

iscuba11:
void watermark()

{

ObjectCreate("fxfisherman", OBJ_LABEL, 0, 0, 0);

ObjectSetText("fxfisherman", "fxfisherman.com", 11, "Lucida Handwriting", RoyalBlue);

ObjectSet("fxfisherman", OBJPROP_CORNER, 2);

ObjectSet("fxfisherman", OBJPROP_XDISTANCE, 5);

ObjectSet("fxfisherman", OBJPROP_YDISTANCE, 10);

return(0);

}

I used fxfisherman's format and put this coding using the name of my ea instead of fxfisherman at the bottom of my ea.

When I compile the ea program again I get an error: Function "watermark" is not referenced and will be removed from exp-file.

Can you help me with this problem???

Thanks in Advance!!!

Dave

<<<

Somewhere in your own code, you have to call this watermark routine.

Just include:

watermark();

Cheers

 

I have tried sticking the watermark(); in all parts of the program (Top, Middle, and near the bottom) and get a global error all the time.

Without this being resolved, the label will not get located on the program. As they say in the South, I are confused?

Dave

 
Michel:
You have the function "watermark()" somewhere in your code but this function is never called, so it's no needed to keep it in the compiled file.

It's not a real error, you can run the ex4 as it is...

The Herbert's solution (call the function anywhere) may be dangerous : it should be better to understand what does this func before calling it.

I like to live dangerous.....

But then again, it's not that dangerous though, it's just a display routine.

Even if you called it at every tick, the worst thing that could happen is performance degrade during backtesting.

iScuba, if you want it fixed, post the EA, or PM me (or Michel)

Cheers

 
iscuba11:
void watermark()

{

ObjectCreate("fxfisherman", OBJ_LABEL, 0, 0, 0);

ObjectSetText("fxfisherman", "fxfisherman.com", 11, "Lucida Handwriting", RoyalBlue);

ObjectSet("fxfisherman", OBJPROP_CORNER, 2);

ObjectSet("fxfisherman", OBJPROP_XDISTANCE, 5);

ObjectSet("fxfisherman", OBJPROP_YDISTANCE, 10);

return(0);

}

I used fxfisherman's format and put this coding using the name of my ea instead of fxfisherman at the bottom of my ea.

When I compile the ea program again I get an error: Function "watermark" is not referenced and will be removed from exp-file.

Can you help me with this problem???

Thanks in Advance!!!

Dave

<<<

You have the function "watermark()" somewhere in your code but this function is never called, so it's no needed to keep it in the compiled file.

It's not a real error, you can run the ex4 as it is...

 
HerbertH:
I like to live dangerous.....

But then again, it's not that dangerous though, it's just a display routine.

Even if you called it at every tick, the worst thing that could happen is performance degrade during backtesting.

iScuba, if you want it fixed, post the EA, or PM me (or Michel)

Cheers

You are right ! I did not see the function was on the post ! Sorry to have interfere...

 

Can you give me a sample of how to call this function Watermark (); so I may learn?

Can I just put the following, and will it work??

ObjectCreate("Forex-Grail", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Forex-Grail", "Forex-Grail", 11, "Lucida Handwriting", RoyalBlue);

ObjectSet("Forex-Grail", OBJPROP_CORNER, 3);

ObjectSet("Forex-Grail", OBJPROP_XDISTANCE, 5);

ObjectSet("Forex-Grail", OBJPROP_YDISTANCE, 10);

return(0);

I just tried the above, it compiled with no errors, but nothing shows on the graph! Frustrating.

I have a good working ea that is still in the test stages, and do not want to reveal the code of the ea.

Dave <<<
 

Try this.. you will find it at the bottom left of the chart

int Table.X.Offset=-825;

int Table.Y.Offset=-105;

ObjectCreate("trademark", OBJ_LABEL, 0, 0, 0);

ObjectSetText("trademark","Your trademark", 13, "Arial Bold", Red);

ObjectSet("trademark", OBJPROP_CORNER, 2);

ObjectSet("trademark", OBJPROP_XDISTANCE, 830 + Table.X.Offset);

ObjectSet("trademark", OBJPROP_YDISTANCE, 117 + Table.Y.Offset);

 

or this.....

int init()

{

watermark();

return(0);

}

void watermark()

{

ObjectCreate("fxfisherman", OBJ_LABEL, 0, 0, 0);

ObjectSetText("fxfisherman", "fxfisherman.com", 11, "Lucida Handwriting", RoyalBlue);

ObjectSet("fxfisherman", OBJPROP_CORNER, 2);

ObjectSet("fxfisherman", OBJPROP_XDISTANCE, 5);

ObjectSet("fxfisherman", OBJPROP_YDISTANCE, 10);

return(0);

}