hello ryangiLLSL,
if the desired condition are awesome <0 and red bar,
double AW = iCustom(NULL,0,"Awesome",short_mean,long_mean,meanAO,0,0); double lime_bar_AW = iCustom(NULL,0,"Awesome",short_mean,long_mean,meanAO,1,0); double red_bar_AW = iCustom(NULL,0,"Awesome",short_mean,long_mean,meanAO,2,0); if((perceptron() < 0) && (TradeShort=True) &&(AW <0 && red_bar_AW != 0.0))
you should check all the takeProfit and stoploss
if(!OrderModify(OrderTicket(), OrderOpenPrice(), Ask+ModifySL*Point, Ask-ModifyTP*Point,0, Blue)) ticket = OrderSend(Symbol(), OP_SELL, lots * 2, Bid, 3, Ask + sl * Point, Ask - Target*Point, "AI", MagicNumber, 0, Red);
I forgot something, sorry,
If you have a look at the amesome indicator, you will see that it do not take any extern, so it should be called that way
double AO = iAO(NULL,0,1); or double AO = iCustom(NULL,0,"Awesome",0,1);
https://docs.mql4.com/indicators/iao
//===========================================
if someone is interessed, this awesome can be smoothed, or optimized, extern are : PERIOD_FAST, PERIOD_SLOW, PERIOD_SMOOTH
double AO = iCustom(NULL,0,"Awsome_1",PERIOD_FAST, PERIOD_SLOW, PERIOD_SMOOTH ,0,1);
https://charts.mql5.com/4/785/eurusd-h1-fxpro-financial-services-2.png
ffoorr,
Thanks for helping me with the adjustments, I have adjusted the code however the EA now only opens short orders and I cannot see why.
Also with regards to calling A0:
double AO = iAO(NULL,0,1); or double AO = iCustom(NULL,0,"Awesome",0,1);
What do I need to adjust or replace>?
The EA does seem to be preforming more in line with what I want, the only problem is I need to open shorts as well as long positions. Can you see why?
the EA work I think.
The trailing_stop cannot be less than 50 Point.
The take profit cannot be modified.
there s a problem of logic. In the original AI there is no Target profit, the profit is within this line, it's the "sl".
// check profit if(Bid > (OrderStopLoss() + (sl * 2 + spread) * Point))
check everything, as usual, ;-)
I have added an object label to show the profit ;
https://charts.mql5.com/4/789/gbpusd-h1-fxpro-financial-services.png
fflorr,
Thats great, thank you very much. The EA seems to close out when an opposing signal is produced, I want each trade to only close out when profit target or stop loss is hit. Can you help me with this, or do you think I would need something to filter out chop?
ryangillSL
This EA is from an MQL4 article, "non conventional trading", you can find it on this site (MQL4) . Read it.
Entries are random, following the perceptron().
With so many indicator as soon as an order is closed, another order is taken randomly, that is why there is so many loss in choppy market.
The code should be optimized to find the best TimeFrame and setting. Order are closed on SL or when the profit is reached AND a reverse signal appears.
Unfortunately it take too much time to develop an EA, I have my own EA to take care about, ;-) But you will always find someone to help here ..

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have an EA that I have put together however the problem is it is not placing orders the way I want it to.
The logic behind it is to trade Short when the following conditions are met:
The EA trades long when the 1m|5m|15m signal bars are red as shown using the Signal_Bars_v3_Daily.mq4 indicator. Also when the awesome indicator is on a RED bar.
It should only trade long when perceptron > 0 && 1m|5m|15m signals are green && awesome indicator is GREEN.
Can someone assist with pointing out my errors.