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.
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
Reread the above and think about it a little more.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Thanks.