Archel wrote >>
Hello
In the last weeks I have made my own indicators that automatically draw trendlines.
One indicator draws one trendline and I have different trendlines (indicators) per timeframe now.
For drawing the trendlines, I didn't use buffers, I only used the formula and then I drew the line with "objectcreate" and "objectset".
Now, I have started to make an EA from it in the form of:
-if it is above that and that line on timeframe x
-if it is above that and that line on timeframe y
....
= buy
...
But I have seen that I probably will only be able to call up those lines and timeframes by using the Icustom function.
And because of this, I need to have buffers, which I didn't use for my trendlines/indicators.
So my question is:
is there another solution than using the Icustom function or do I have to partly rebuild my indicators by implementing buffers?
thx in advance
Steven
Hello
In the last weeks I have made my own indicators that automatically draw trendlines.
One indicator draws one trendline and I have different trendlines (indicators) per timeframe now.
For drawing the trendlines, I didn't use buffers, I only used the formula and then I drew the line with "objectcreate" and "objectset".
Now, I have started to make an EA from it in the form of:
-if it is above that and that line on timeframe x
-if it is above that and that line on timeframe y
....
= buy
...
But I have seen that I probably will only be able to call up those lines and timeframes by using the Icustom function.
And because of this, I need to have buffers, which I didn't use for my trendlines/indicators.
So my question is:
is there another solution than using the Icustom function or do I have to partly rebuild my indicators by implementing buffers?
thx in advance
Steven
I can help you write the EA if you want. let me know your email and I will respond.
Thanks
ForexWatchman
ForexWatchman:
I can help you write the EA if you want. let me know your email and I will respond.
Thanks
ForexWatchman
I can help you write the EA if you want. let me know your email and I will respond.
Thanks
ForexWatchman
I only need to know how to get it from other charts.
Isn't there some simple solution like:
for chart x
objectgetvaluebyshift
for chart y
objectgetvaluebyshift
?
@forexwatchman.
I know you probably only want to help but I've worked a long time on finding my system (manual), probably almost a 1000 hours,
so I won't give my calculations to somebody else for the smallest problem there occurs with trying to make it automatically. ^^
:)
If you can use icustom to return your trendline's price, cant you do a simple check to see if the price is above or below?
double trendlineprice = iCustom(NULL, PERIOD_H1, "trendlinethingo", x, x, Current + 0);
if (ask > trendlineprice) Order = SIGNAL_BUY;
or
double Current_CandleOpen = iOpen(NULL, PERIOD_M30, Current + 0);
if (Current_CandleOpen > trendlineprice) Order = SIGNAL_BUY;
double trendlineprice = iCustom(NULL, PERIOD_H1, "trendlinethingo", x, x, Current + 0);
if (ask > trendlineprice) Order = SIGNAL_BUY;
or
double Current_CandleOpen = iOpen(NULL, PERIOD_M30, Current + 0);
if (Current_CandleOpen > trendlineprice) Order = SIGNAL_BUY;
No, but I have found a solution.
The problem for your answer is what Forexwatchman said: the buffer only remembers the values of the 2 prices used to draw the trendline, and not the prices of the slope that comes behind it.
But what I now have done is (for if someone ever would need it):
-> in the indicator itself:
-make a formula that calculates the price of the trendline at the current bar: x=price1+((price2-price1)*...)
- in int init:
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,TrendLine);
SetIndexEmptyValue(0,0.0);
- instead of drawing the trendline I use for manual trading with objectcreate...., I only write this:
TrendLine[0]=x
Then you actually get connected dots with the dot at the current bar= price of the trendline at that bar, if it would be drawn...
-> in EA, something like this:
A= iCustom("EURJPY", PERIOD_M1,"Indicatorname", Blue,0,0);
if (ask >A) Order = SIGNAL_BUY
The problem for your answer is what Forexwatchman said: the buffer only remembers the values of the 2 prices used to draw the trendline, and not the prices of the slope that comes behind it.
But what I now have done is (for if someone ever would need it):
-> in the indicator itself:
-make a formula that calculates the price of the trendline at the current bar: x=price1+((price2-price1)*...)
- in int init:
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,TrendLine);
SetIndexEmptyValue(0,0.0);
- instead of drawing the trendline I use for manual trading with objectcreate...., I only write this:
TrendLine[0]=x
Then you actually get connected dots with the dot at the current bar= price of the trendline at that bar, if it would be drawn...
-> in EA, something like this:
A= iCustom("EURJPY", PERIOD_M1,"Indicatorname", Blue,0,0);
if (ask >A) Order = SIGNAL_BUY
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
In the last weeks I have made my own indicators that automatically draw trendlines.
One indicator draws one trendline and I have different trendlines (indicators) per timeframe now.
For drawing the trendlines, I didn't use buffers, I only used the formula and then I drew the line with "objectcreate" and "objectset".
Now, I have started to make an EA from it in the form of:
-if it is above that and that line on timeframe x
-if it is above that and that line on timeframe y
....
= buy
...
But I have seen that I probably will only be able to call up those lines and timeframes by using the Icustom function.
And because of this, I need to have buffers, which I didn't use for my trendlines/indicators.
So my question is:
is there another solution than using the Icustom function or do I have to partly rebuild my indicators by implementing buffers?
thx in advance
Steven