ldrawing lines on visual backtest window

 
Trying to find examples of how to add simple graphics to the chart window that is displayed when backtesting in visual mode. The graphics would be very similar to a custom indicator. I cannot seem to find this info anywhere in the MT4 or MQL4 help files.
Thanks.
 

I think what I have done before is this:

When you start a Visual Backtest, you get a very plain window.

Start visual mode, very slowly, then Apply a Template from a chart that has the indicators and chart styles you want to see.

Example:

If your EA uses a 20 period moving average...

Before running the tester, open a chart, add 20 period moving average, create a template.

Start the tester in visual mode and apply the template.

----

Now I remember I used to test indicators this way.

Create a new Expert, name it Dummy, and save, no changes to the Expert. It does nothing, but lets you run the backtester.

Then apply a template that includes the indicator you want to watch.

----

Looking at it again, running a Dummy EA, I can add/remove indicators, draw trendlines, whatever.

It is acting like a live chart, just in "replay" mode. It won't make a manual trade, though.

 
Thanks for the reply Phy. What I want is like an indicator, but is not an actual indicator. I want to draw a line on the chart that represents where my trailing stop is and how it moves to make sure my code is working right. Moreover, my trailing stop is not an actual trailing stop order entered in at the client terminal, but is a custom variable I have coded in MQ4 and does not stay constant, as in a 15 pip TS, or whatever, but adjusts itself based on how much profit the current trade has. I need something much like the Print function, something like:

if (OrdersTotal > 0)
{
Draw (TrailingStop);
}
 

Add code to the EA to set a GlobalVariable

GlobalVariableSet("TrailingStop", trailingStopValue);

Write an indicator to move a horizontal line according to the value of the trailing stop global variable

string name = "SomeStupidName";

init(){

ObjectCreate(name, OBJ_HLINE, 0, Time[0], 0, 0, 0);

}

int start(){

ObjectSet(name, OBJPROP_PRICE1, GlobalVariableGet("TrailingStop");

}

See if that works

 
It doesn't seem to work. The code compiles with no errors, but no extra lines are drawn on the chart. I'm not sure if I put the code snippets in the right places. I put the GlobalVariableSet and the ObjectSet in the start function. Where do I put the ObjectCreate? Above the start function? DO I have to write a seperate script and apply it to the chart manually? Is the GlobalVariableSet supposed to go outside of the start function?
 

Reread the above and think about it a little more.

Reason: