Experts: Daily Chart Trader - page 3

 
Kenneth Bachelor:

I mentioned previously that I'd made some minor modifications but I never told you what, so here's the change I made so that my trade size is linked to my account equity by the lots setting instead of being a fixed proportion.

/* KB   double lot = MathMax(NormalizeDouble(0.00001*AccountEquity(),2),MarketInfo(Symbol(),MODE_MINLOT));*/
   double lot = MathMax(NormalizeDouble(lots/100*AccountEquity(),1),MarketInfo(Symbol(),MODE_MINLOT));

I've noticed that usually (but not always) trades are opened at 16:00 UK time (18:00 Server time) and close when the markets open for the following day having generated overnight SWAP. I'm not much of a programmer but if the trade is long and going to close at the next day's open, I would like it to close at the end of the current day. Is there a setting or a section of the code I can change to achieve this?

I will work it out to make it close at  30 seconds before the close of the day.

You can use 

if(Hour() == your_broker_closing_hour && Minute() == 59 && Seconds()== 20) OrdderClose(.........);
 
Gbenga Ayodele:

I will work it out to make it close at  30 seconds before the close of the day.

You can use 

Also i will send the updated version that addresses all issues and bugs here when i am through with it.

When testing it on my real account , i discovered some new improvement needed to be made to the code to enhance it profitability.

Reason: