DislikedI think each traders have their own way to see coding format. I could read easily. Haha... of course because coded by myself. I put //---1A and //---1B in coding to give me understand that this is a complete open and close curly bracket. This code has 2 void functions which are separated by //=====
I have tested different broker, seem like it generates error for the "ordersend" due to pricing issue(entry,stop loss and target price). Some brokers 4 decimals and some are not. I will fix this.
However, when i backtest, i have assigned initial...Ignored
now that i look at it briefly again and without actually testing (so i'm educated guessing here) :
Inserted Code
while(true) { if (Hour()>=23 && Minute()>=50) //---3A { OrderSelect(ticket, SELECT_BY_TICKET); if (OrderTicket()==ticket && (OrderType()==OP_BUY || OrderType()==OP_BUYSTOP || OrderType() == OP_BUYLIMIT)) { OrderClose(ticket,1,Bid,3); break; } } else
infinite loop because you aren't allowing mt4 to get out and do any further ticks, so you are stuck on the one time. but, again, your formatting is too horrible for me to really scrutinize this properly.
edit : actually, my description of what i believe your code is doing is wrong. i'd have to reformat it to read it properly and follow it better. i still think you are just getting stuck in your while loop, and using while(true) is really poor form and generally unnecessary if not simply wrong... wrong in the sense that you are misusing the tools at hand.
personally, i've never ever used 'break' from anything other than switch statements which basically require them. and i don't think i've ever used 'continue' in my entire life. for a novice coder you should consider doing things differently to how you have so far.
Congratulations ScalaFX for coming out of the closet!