Home › Forums › Trading Systems Discussion › True Bars/Candles and Market Sentiment › Reply To: True Bars/Candles and Market Sentiment
Well structured code and easy to read!
So, this is my sonar tool. This can be wrong though ….
What I don’t understand: Placing your tool on current CHFJPY H1 provides a picture I did not expect (see attachment). Huge ranges for M1 and M5, considerably smaller for M15 and M30. What’s your opinion here? I expected ranges to decrease with decreasing timeframe. Inside your code: I tried to unleash your tool and make it draw the sonar view on past candles. So I made variable candleToCalc an extern and recompiled. I got absolutely no sonar for candleToCalc > 0. So my question is what’s the intended interaction of variables candleToCalc and baseCandleTime. It doesn’t seem to work for candleToCalc > 0.
if (iTime(NULL,PERIOD_H1,0) != newCandleTime) { newCandleTime = iTime(NULL,PERIOD_H1,0); FuncDeleteObjects(); } else { baseCandleTime = iTime(NULL,PERIOD_H1,candleToCalc); if ((TimeCurrent() >= baseCandleTime+(PERIOD_H1-lastMinToCalc)*60)&&(TimeCurrent()<baseCandleTime+PERIOD_H1*60)) { // begin calculation FuncCalculateH1(baseCandleTime,candleToCalc); FuncCalculateM30(baseCandleTime,candleToCalc); FuncCalculateM15(baseCandleTime,candleToCalc); FuncCalculateM5(baseCandleTime,candleToCalc); FuncCalculateM1(baseCandleTime,candleToCalc); } }
Did I misunderstand your basic idea? s.
You are absolutely right bro, you understand my code very well. So, it means my code has bugs … i will try to look into it today …
Thanks for your feedback …
Edit: Still working on this. Need to solve some bugs, candle H1 that near weekend time …
-
This reply was modified 5 years, 1 month ago by
smallcat.