You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
That looks good to me. You are definitely on the right track.
If using in the strategy tester, you will have to attach the indicator to the tester chart (ie attach the indicator to a chart and save template as tester.tpl
For your EA to detect objects in Strategy Tester, it must be run in visual mode .
To reduce the amount of Prints you may only want to print when the "trend" changes
or if watching in visual mode, consider using Comment() instead of Print()
There is nothing appear on the Chart GumRai :(
I wrote a simple indicator to create an object and change the colour every hour
I then adapted your code in an EA
Ran it in visual mode (with the indicator template saved as tester.tpl)
and it worked as expected with the prints in the journal
0 03:19:32 2015.01.05 00:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:32 2015.01.05 00:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:32 2015.01.05 01:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:32 2015.01.05 02:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:32 2015.01.05 03:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 04:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 05:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 06:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 07:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 08:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 09:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 10:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 11:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 12:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 13:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 14:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 15:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 16:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 17:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 18:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 19:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 20:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 21:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.05 22:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.05 23:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.06 00:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.06 01:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.06 02:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
0 03:19:33 2015.01.06 03:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.06 04:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
What are you seeing in the journal?
I wrote a simple indicator to create an object and change the colour every hour
I then adapted your code in an EA
Ran it in visual mode (with the indicator template saved as tester.tpl)
0 03:19:33 2015.01.06 03:00 Check Object Colour EURUSDSB,H1: The color is clrRed and the Trend = DOWN
0 03:19:33 2015.01.06 04:00 Check Object Colour EURUSDSB,H1: The color is clrLimeGreen and the Trend = UP
What are you seeing in the journal?
:) , I forgot to change the Template , Ok it works fine now .
Another Question : How can I see the color of two Time frames ? For example the H1 And The Daily .
I tried to To use The Object Names of the timeframes I want , But , Only the M5 and the current timeframe change their color (Look at the picture) .
:) , I forgot to change the Template , Ok it works fine now .
Another Question : How can I see the color of two Time frames ? For example the H1 And The Daily .
I tried to To use The Object Names of the timeframes I want , But , Only the M5 and the current timeframe change their color (Look at the picture) .
That is dependent on the indicator. If the objects do not change colour, then a colour change cannot be detected.
Maybe the inputs for the indicator allow you to change the applied time-frames?
That is dependent on the indicator. If the objects do not change colour, then a colour change cannot be detected.
Maybe the inputs for the indicator allow you to change the applied time-frames?
In Main chart window the indicator objects change their colors , like in the image
What do you think the problem is GumRai ??
This is the indicator :
Some indicators do not always work as expected in the strategy tester. Seems to be the case with this indicator.
Getting the objects' colour should work ok on realtime charts though
Some indicators do not always work as expected in the strategy tester. Seems to be the case with this indicator.
Getting the objects' colour should work ok on realtime charts though
Thank you GumRrai , Could you say to way The Ea run only The Sell Orders , see the code ?
Possibly because the Daily colour does not change to LimeGreen at any time during the test
Do you have any print statements that the colour is lime green and Trend=0 in the journal?
Possibly because the Daily colour does not change to LimeGreen at any time during the test
Do you have any print statements that the colour is lime green and Trend=0 in the journal?
Thanks Alot GumRai , But still the Problem of multi time frames , I will find a solution for it , or I will Try with Another indicator work with the buffers using iCustom()