molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming http://www.molanis.com/forum/ |
|
Trend Slope Indicator http://www.molanis.com/forum/viewtopic.php?f=9&t=288 |
Page 1 of 1 |
Author: | MattMan136 [ Mon Mar 14, 2011 11:02 pm ] | ||
Post subject: | Trend Slope Indicator | ||
I created an EA using a custom indicator. The EA will correctly trade the uptrend of the indicator. The value is placed in "Signal Line (15)"). The EA won't trade the downtrend of the indicator. The value is placed in "Value 2". The value would be "214748367". For me, it would make sense to just use one output value i.e Signal Line (15). Thank you for your assistants Matthew
|
Author: | molanisfx [ Tue Mar 15, 2011 8:48 am ] |
Post subject: | Re: Trend Slope Indicator |
Please attach your strategy file (.mol file) Going forward, do not attach strategies in mq4 or ex4 format. For support we require to use the strategy file for molanis strategy builder and your custom indicator's mq4 file |
Author: | MattMan136 [ Tue Mar 15, 2011 5:56 pm ] | ||
Post subject: | Re: Trend Slope Indicator | ||
Attached is mol file. Thank you, Matthew
|
Author: | molanisfx [ Wed Mar 16, 2011 9:22 am ] |
Post subject: | Re: Trend Slope Indicator |
What you see in the screen is a line than changes colors. In MT4 this is made using two lines but showing one at a time. So when the indicator paints the red line, the green line is painted with a value of empty (not zero) so you don't see it - and vice versa. In mt4 EMPTY_VALUE = 2147483647 In Metatrader empty is defined as a huge number, so your conditions can be compared to 100000 (or any number bigger that the prices but smaller that mt4 empty - we use 100000) The indicator code shows this: SetIndexBuffer(0, Uptrend); SetIndexBuffer(1, Dntrend); So uptrend is mode 0 downtrend is mode 1 You did not describe your logic so no idea when you want to buy (the logic in the trading diagram seems odd). If you want to buy when there is an uptrend line, just use indicator mode 0 < 100000 this tells you the indicator is painting a green line. If you want to buy when the price is below that line, use indicator mode 0 < 100000 AND price < indicator mode 0 (use the icon AND to create this condition) For sell, indicator mode 1 < 100000 tells you that the indicator is painting a red line. In your strategy you trade using bars, I would not use bid/ask with this indicator and trading bars. bid / ask are used when trading ticks, when trading bars a close price may work better. |
Page 1 of 1 | All times are UTC - 5 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |