What is this meant to achieve ? and how does it achieve it ?
if(Hour() == StartHour) // Time to put your orders
Hi Charma,
I just found your EA today and I have fixed the custom indicator signal for you, I have been searching for years to find An editable Copy of the
Sidus v.2 indicator and thanks to you I now know how it works. I have Attached a copy of the edited EA for you but I will explain to you what I did also.
I removed the code:
if(Hour() == StartHour) // Time to put your orders
As it would only open a trade if both the StartHour and custom indicator parameters were true...
once I removed that part I read the code for the Sidus Indicator to edit this part for you:
double haOpen = iCustom(NULL,0,"sidus",14,21,17,false,2,1); double haClose = iCustom(NULL,0,"sidus",14,21,17,false,3,1); if(haOpen < haClose) { cmd = 0; price = Ask; colour = Green; stoploss = Bid - SL*Point; takeprofit = Ask + TP*Point; } if(haOpen > haClose) { cmd = 1; price = Bid; colour = Red; stoploss = Ask + SL*Point; takeprofit = Ask - TP*Point; } if(cmd != 2) { OrderSend(Symbol(), cmd, Lots, price, slippage, stoploss, takeprofit, NULL, magic, 0, colour) ; return;
I edited like this:
double HaOpen = iCustom(NULL,0,"sidus v.2",14,21,17,false,3,1); double haOpen = iCustom(NULL,0,"sidus v.2",14,21,17,false,2,0); double HaClose = iCustom(NULL,0,"sidus v.2",14,21,17,false,2,1); double haClose = iCustom(NULL,0,"sidus v.2",14,21,17,false,3,0); if(HaOpen < haOpen) // BUY SIGNAL!! { cmd = 0; price = Ask; colour = Green; stoploss = Bid - SL*Point; takeprofit = Ask + TP*Point; } if(HaClose < haClose) // SELL SIGNAL!! { cmd = 1; price = Bid; colour = Red; stoploss = Ask + SL*Point; takeprofit = Ask - TP*Point; } if(cmd != 2) { OrderSend(Symbol(), cmd, Lots, price, slippage, stoploss, takeprofit, NULL, magic, 0, colour) ; return;
Sadly the Indicator is still not placing all the Buy Sell signals when back testing but I will try to fix that problem and attach the new indicator at a latter date..
I am also making my own EA that will Move Order Stops at each signal following the trend Just like you would when manual trading and I will post it too once I am done.
You still need to add a MaxOrder option to your EA as it will keep placing orders for the Whole Bar.. Maybe a Maxtrade per Bar option would work..
Anyway I Hope you find this helpful and once again Thank You for posting the Indicator code you have made me a very happy man ;)
Best Regards: FirePubes..
JeffRo
Hi Charma,
I just found your EA today and I have fixed the custom indicator signal for you, I have been searching for years to find An editable Copy of the
Sidus v.2 indicator and thanks to you I now know how it works. I have Attached a copy of the edited EA for you but I will explain to you what I did also.
I removed the code:
As it would only open a trade if both the StartHour and custom indicator parameters were true...
once I removed that part I read the code for the Sidus Indicator to edit this part for you:
I edited like this:
Sadly the Indicator is still not placing all the Buy Sell signals when back testing but I will try to fix that problem and attach the new indicator at a latter date..
Indicator
int start(){ RefreshRates();
Unnecessaryif(counted_bars>0) counted_bars--; limit=Bars-counted_bars;
Contradictory information on IndicatorCounted() - MQL4 forumfor(int i=0; i<limit; i++){ if (pipdiffCurrent>0 && rsi_sig>50) .. if (sigCurrent==1 && sigPrevious==2)
What is sigPrevious, you are counting UP. there is no previous You can't look at future values.
Always count downfor(int i=Bars-1-counted_bars; i>=0; i--){
if (sigCurrent==1 && sigPrevious==2) { ExtMapBuffer4[i-1] = High[i-1]-5*Point;
Again you are setting a future indicator value. You probably meanExtMapBuffer4[i] = High[i+1]-5*Point;
EA
for(int i=0;i<OrdersTotal();i++)
Get in the habit of couning down. Loops and Closing or Deleting Orders - MQL4 forumcmd = 1; price = Bid; colour = Red; stoploss = Ask + SL*Point; takeprofit = Ask - TP*Point; } if(cmd != 2) { OrderSend(Symbol(), cmd, Lots, price, slippage, stoploss, takeprofit, NULL, magic, 0, colour) ;
Not adjusting for 4/5 digit brokers, not adjusting for ECN brokers. Not testing return codes.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello!
I' a beginner in programming. I learn it two month ago, and now i don't know what can i do. So please help to me. :)
I very respecting u RaptorUK. If u have some free minutes, please help :)
I read all topics, what can help to me.
Its have some, for Sidus:
https://www.mql5.com/en/forum/134736
So, i want to programming to EA an Indicator. It name is Sidus v.2.
This program code is it:
And i did it!
Here: