petrincak: I have a problem that I'm open position immediately on the first candle. I want it opened on another candle from the new daily high-low.
- So wait for the start of a new day
#define HR2400 86400 // 24 * 3600 int TimeOfDay(datetime when){ return( when % HR2400 ); } datetime DateOfDay(datetime when){ return( when - TimeOfDay(when) ); } datetime Today(){ return(DateOfDay( TimeCurrent() )); } datetime Tomorrow(){ return(Today() + HR2400); } datetime NextTrade; int init(){ NextTrade = Tomorrow(); } int start(){ if(Today() < NextTrade) return; // Wait until new day : if(...){ OrderSend(...); NextTrade = Tomorrow(); // Opened an order, no more today.
- Your iCustom calls are the current day not previous day. Thus Close[0] will ALWAYS be between hi/lo
Thank you for your answer and idea. But I want trade currnet daily HL. Because I Trade on Renko chart, I want to program the new value of the daily high, for the next candle, which will open <DailyH opened sell. And after open>DialyL the same.
This is my manual system. And I want it convert to EA. :)

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 program EA based on daily high-low. Program enters with the help of indicator induced through iCustom. I have a problem that I'm open position immediately on the first candle. I want it opened on another candle from the new daily high-low.
I attach files.
Thank you for any help or advice. :-)