its a different qustion
maybe you don't remember but i do
1: (https://www.mql5.com/en/forum/151484/page3#962873)
ryangillSL:
2: (https://www.mql5.com/en/forum/151484/page3#962879)Also how would i open the trade on the open of the next bar from an indicator signal?
ryangillSL:
i.e to open the trade x bars after signal is triggered?
i.e to open the trade x bars after signal is triggered?
and the answer is given to you over there
if (newBar)
{
your code
}
OK i got it,
so signal is trigered on bar, i want to wait 1 bar and open on next bar, would this do it?
if(uptrend && Sell_Pos == 0 && NewBar[1])
Ticket
no but you can modify the function to suit your requirements using Time or iTime or PeriodSeconds or iBarShift etc. (there is plenty more)
or you can play around with the iCustom function example:
bool uptrend=iCustom(NULL,0,"super_signals_v2_alert",0,0)!=EMPTY_VALUE; bool downtrend=iCustom(NULL,0,"super_signals_v2_alert",1,0)!=EMPTY_VALUE;
or
bool uptrend=iCustom(NULL,0,"super_signals_v2_alert",0,1)!=EMPTY_VALUE; bool downtrend=iCustom(NULL,0,"super_signals_v2_alert",1,1)!=EMPTY_VALUE;
or
bool uptrend=iCustom(NULL,0,"super_signals_v2_alert",0,2)!=EMPTY_VALUE; bool downtrend=iCustom(NULL,0,"super_signals_v2_alert",1,2)!=EMPTY_VALUE;
etc.
Thats great, thank you for your help....
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have an indicator that repaints, I would like to open a position x bars from the signal bar, could someone show me how do code this.
Also, the signal is triggered each tic of the signal bar, how can i get it to signal at the close of the bar only?
Thanks