Meaning that crosses are different etc (depending on the indicator style). This means that the indicator is not working correctly, is that right?
- Backtesting is for EAs not indicators.
- If they look at other pairs and assume iTime(otherpair,x) == Time[x] they're completely broken (must use iBarShift.)
- If they use marketInfo(MODE_ASK) instead of Ask they're broken
- If they don't properly use IndicatorCounted()
- If they do something with local time.
- If they repaint it will be like live - looks good after the fact but can't be used for trading. Examples ZigZag, COG.
- Backtesting is for EAs not indicators.
- If they look at other pairs and assume iTime(otherpair,x) == Time[x] they're completely broken (must use iBarShift.)
- If they use marketInfo(MODE_ASK) instead of Ask they're broken
- If they don't properly use IndicatorCounted()
- If they do something with local time.
- If they repaint it will be like live - looks good after the fact but can't be used for trading. Examples ZigZag, COG.
7. If they use Bid or Ask they will not work in the ST, Bid can be replaced with Close[0] . . . there is viable alternative for Ask.
- Backtesting is for EAs not indicators.
- If they look at other pairs and assume iTime(otherpair,x) == Time[x] they're completely broken (must use iBarShift.)
- If they use marketInfo(MODE_ASK) instead of Ask they're broken
- If they don't properly use IndicatorCounted()
- If they do something with local time.
- If they repaint it will be like live - looks good after the fact but can't be used for trading. Examples ZigZag, COG.
7. If they use Bid or Ask they will not work in the ST, Bid can be replaced with Close[0] . . . there is viable alternative for Ask.
Thanks for all the answers.
So just to understand this, i use an indicator in a simple EA so to call it from ST and display it using the code bellow. Then i place the same indicator on a live chart and i compare the indicators on these two charts to check if they look exactly the same.
Using the ST wont it show up if there is a problem of any of the above 1-7 statements?
In general there are quite a number of indicators (some of them in the Code Base) that when i use the above way testing them (using the code bellow) do not look the same. But so far i wasnt aware of the 1-7 statements...
By the way here is the code i use to test indicators:
#include <stderror.mqh> #include <stdlib.mqh> #property indicator_level1 0 #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Green double BufLong[]; extern int history=300; int init() { string s=""; IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,BufLong); SetLevelValue (0, 0.0000); // The horizontal line level is set return(0); } int start() { int counted_bars = IndicatorCounted(); int candles=Bars-counted_bars; // Index of the first uncounted if (candles<0) return (0); if (candles>history-1) // If too many bars .. { candles=history-1; // ..calculate specified amount } i=0; while (i<=candles) { BufLong[i]= iCustom(Symbol(),Period(), "SilverTrend", 400,7,1.6,50.6,false, 0 , i); //adx;//i_Regr_i(1, 2, 120, 0, i); i++; } // while return (0); }
The strange with the above code is that no matter what type of indicator i ll call through iCustom, it will display as normal on the chart nomatter that i only got one buffer (BufLong[]).
Thanks for all the answers.
So just to understand this, i use an indicator in a simple EA so to call it from ST and display it using the code bellow. Then i place the same indicator on a live chart and i compare the indicators on these two charts to check if they look exactly the same.
Using the ST wont it show up if there is a problem of any of the above 1-7 statements?
Yes problems will show up in the Strategy tester but only if you know what to look for and that you should be looking . . . this may help you some more: https://www.mql5.com/en/forum/143310/page2#753353
thanks, yes it does!
But as far as i understood there is no way to be 100% sure that an indicator you create it works correctly when you try it out to ST ( I m always talking about an indicator not EA).
thanks, yes it does!
But as far as i understood there is no way to be 100% sure that an indicator you create it works correctly when you try it out to ST ( I m always talking about an indicator not EA).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
on some indicators like when you backtest them the results are not the same on the chart as when you compare the same indicator on a live chart the same time period.
Meaning that crosses are different etc (depending on the indicator style). This means that the indicator is not working correctly, is that right?