Buy and sell depending on Custom indicator signals
5 replies
Tarwada
11 years ago #113053
how can i Tell the EA to Sell and Buy only when a signal appear from a custom indicator ?
see an example here :

i imported the custom indicator but i don’t know how to tell the ea to do it
there is no (if something appeared then do something)

and finally , how to checkout the last closed position type ?
0
Tarwada
11 years ago #128201
hello ? 🙁
0
Tarwada
11 years ago #128235
up up up up anyone ? 😆
0
Mark Fric
11 years ago #128252
have you imported your custom indicator to EA Wizard? Is it named BBands?
If yes then you should just compare its value with somehting. I don’t know your custom indicator, you shoud look at the values it returns in Data window in MT4.
But I assume it has UpTrendSignal and DownTrendSignal outputs and they are 0 until there is a signal. Then they are non-zero.
So in your strategy you just have to cmpare this indicator with zero.
For example:
IF BBands(…, UpTrendSignal) > 0
THEN
…
If you are struggling to find number on the right side of comparison, it is on “Other” selectbox.
Mark
StrategyQuant architect
0
Tarwada
11 years ago #128525
thanks thanks a lot !!!
i will try that
but how to checkout the last closed position type ?
0
Mark Fric
11 years ago #128835
use function Last order was Long/Short
Mark
StrategyQuant architect
0
Viewing 5 replies - 1 through 5 (of 5 total)