Heiken Ashi smoothed indicator into EA
-
I am not sure what the issue is here. I am trying to create an EA with custom indicator "Heiken Ashi smoothed" but it's not working. I have it using buffer 1 (thin signal line) crossing buffer 2 (orange & blue line) as signals. However using 2 different timeframes for signals. Master timeframe for trend direction and then slave timeline to enter trades in trend direction.


Here is the indicator: 0_1586989801742_Heiken ashi smoothed oscillator.mq5
Here is the EA I created with fxDreema: 0_1586989906310_DP-HASO.mq5
Any help with why this is not working would be welcomed. Thank you!
-
@bsinclair Hi. your blocks have 3 problems.
- Just using one Trailing stop and connect to first block yellow side(left)
- Indicators blocks together connect to orang connection
- create separate blocks for close position
if you want i check your logic please share your project here by a link (in the menu)
-
@xfire Thanks for the help. This is really cool. Didn't know you could share project too. Here is the link. https://fxdreema.com/shared/M34H2kAYd
-
@bsinclair it is the best structure for your blocks
.
you should create blocks for close positions -
We have a problem here: how can you trail your stops if there is no position

-
@xfire What is the purpose of "If trade >Condition > Close Trades"? Isn't close position taken care of by the Trailing stop?
-
@roar You have a great point.. lol.. I removed that now.. Sorry for my ignorance. Just learning here.
-
@roar yes that is correct. thank you

-
Its an easy fix, just connect the yellow of "no position" to the trailing stop, just like my red line.
If you think about it, FALSE of "no position" is the exactly same as TRUE of "if trade".
-
@bsinclair yes, you can just be working with Stop less.
-
@xfire & @roar - Thank you for your help!
I have updated the project. Link: https://fxdreema.com/shared/JxtHuimVdRemoved the "No position" all together and using trailing stop to close positions, but it's still not making any trades when I run optimization.
Now I wondering if it's my indicator and it's buffers. Any suggestions how to fix that?
-
@bsinclair Its your margin condition. 0 is never above 1. Change it to "return infinite"
-
@roar Like this?

-
@bsinclair yess
-
@roar Ok. Let's see how this goes. Wish there was a way to test in Fxdreema vs. having to download, import and test in MT5. lol. But hey Fxdreema is a life saver for me, I can learn this, learning all the coding of mql5 was killing me.
-
@Xfire @roar
Well.. bad news.. still no trades occurring. I am at a loss now why it won't make trades. Only thing I can think of is it's the indicator and it's buffers.Here is the latest project link: https://fxdreema.com/shared/KCrYmcbJb
-
@bsinclair must be the indicators, then. This is why I never use custom indicators, they are always trouble lol

Troubleshoot the project by breaking it to smaller parts.. The comment block and simple draw line block are great troubleshooting tools
-
-
-
This is what I am trying to create for everyone..
Using the Heiken ashi smoothed oscillator indicator (attaching below), when the HA oscillator line is above (buy) or below (sell) the HA oscillator average on 2 timeframes… 1H and 20min on EURUSD I have had 85% accuracy with my trades manually. I have done so by watching and waiting for the signal direction to be the same in both time frames. The 1H timeframe is my master for signal direction and 20m is my entry signals.Here are the inputs I would recommend for the EA to have:
///----Signal Inputs ----//
---Signal 1 (Master Trend Direction for Signal Entries)---
Timeframe: "X"
Pre smoothing average Period: #
Pre smoothing average Method: Simple / Exponential / Smoothed / Linear
Pos smoothing average Period: #
Pos smoothing average Method: Simple / Exponential / Smoothed / Linear
Signal Period: #
Signal Method: Simple / Exponential / Smoothed / Linear---Signal 2 (Entry Signal)---
Trade Signal Mode = During Candle / Close of Candle
Timeframe: "X"
Pre smoothing average Period: #
Pre smoothing average Method: Simple / Exponential / Smoothed / Linear
Pos smoothing average Period: #
Pos smoothing average Method: Simple / Exponential / Smoothed / Linear
Signal Period: #
Signal Method: Simple / Exponential / Smoothed / Linear//----Trade Entry & Exit Management ----
Min Margin Level % for Additional Trade Entry: #
Close on Opposite Signal from Master Signal: True / False//---- Time Properties ---//
Use Time Properties: True / False
Start Hour: #
Start Minute: #
Stop Hour: #
Stop Minute: #
Close All trades on Friday Close: True / False
Friday Stop Hour: #
Friday Stop Minute: #//----Money Management --//
Volume Type: Fixed Lot / % of Equity
Volume Value: # (allow for decimals)
Target Daily Profits in ticks (0 = off): #
Target Daily Losses in ticks (0 = off): #
Max Number of open positions in trend (0=off): #//--- Stop Parameters --- //
Take Profit (ticks, 0=off): #
Stop Loss (ticks, 0=off): #
Trail Start (ticks, 0=off): #
Trail Distance (ticks, 0=off): #
Trail Step (ticks, 0=off): #
Break Even Start (ticks, 0=off): #
Break Even Value (ticks, 0=off): #Heiken ashi smoothed oscillator indicator: 0_1587222265642_Heiken ashi smoothed oscillator.mq5

