Experts: Daily Chart Trader - page 2

 
It would be useful if you could tell us what the various parameters actually do. I'm far from being an expert when it comes to coding and I'm totally mystified.
 
Kenneth Bachelor:
It would be useful if you could tell us what the various parameters actually do. I'm far from being an expert when it comes to coding and I'm totally mystified.
If you are not used to coding, use the ea as it is. If you follow instruction and comment here, it left for you to decide if your broker is good or not. Leave parameters for those that know how code and experiment with it. X&Y are coordinates of the display point on the chart.

 
Gbenga Ayodele:
If you are not used to coding, use the ea as it is. If you follow instruction and comment here, it left for you to decide if your broker is good or not. Leave parameters for those that know how code and experiment with it. X&Y are coordinates of the display point on the chart.

Thank you. I've done the change and I understand the X and Y's. Now I'm mystified by what all the other settings do. I think step (900) is the T/P setting, but if it is, why isn't called T/P? There has to be a reason!
 
With a few modifications I've managed to get it to work on my live trading, but using the default parameters as you suggest, from 1 January the MT4 the tester stops after 4 trades with OrderSend error 131. In fact this morning it doesn't even open a trade at all!
 
Kenneth Bachelor:
With a few modifications I've managed to get it to work on my live trading, but using the default parameters as you suggest, from 1 January the MT4 the tester stops after 4 trades with OrderSend error 131. In fact this morning it doesn't even open a trade at all!

The error 131 is because your broker stoplevel is high. Check the spread with the broker you are using and adjust your step value with it.

 
Gbenga Ayodele:

The error 131 is because your broker stoplevel is high. Check the spread with the broker you are using and adjust your step value with it.

Thank you for the information.

As you know I've been asking what step means and I'd decided it was involved in the T/P, although that is calculated as being nearer 110. As you will see from the attached, the specification says 20 which is a long way from 900. Anyway until I'm told differently I've increased the 900 to 1000 and it seems to be working at the moment.

Once again, thank you for your help.

Ken Bachelor

Files:
EURUSDSpec.gif  15 kb
 
Kenneth Bachelor:

Thank you for the information.

As you know I've been asking what step means and I'd decided it was involved in the T/P, although that is calculated as being nearer 110. As you will see from the attached, the specification says 20 which is a long way from 900. Anyway until I'm told differently I've increased the 900 to 1000 and it seems to be working at the moment.

Once again, thank you for your help.

Ken Bachelor

I find it very difficult to do anything without having any idea why I'm doing it. Since I wrote the above message, I haven't had a trade on my live platform in spite of the trades being called a 'Daily Gamble'. I expected the word daily to imply 1 trade a day, but it obviously doesn't so I'm going to have to give up on this.
 
Kenneth Bachelor:
I find it very difficult to do anything without having any idea why I'm doing it. Since I wrote the above message, I haven't had a trade on my live platform in spite of the trades being called a 'Daily Gamble'. I expected the word daily to imply 1 trade a day, but it obviously doesn't so I'm going to have to give up on this.

if (you have not done so)

                       {

Download any of the following MT4 demo account ant test it on their platform: 1...NPBFX MT4 demo 
2......ICMarkets MT4 Demo 
3.....Dukascopy MT4 Demo
Let us know if you have the same result.

                     } else{

The reason i called the trade comment "Daily Gamble " is because not all days end up with profit;

I am already testing it demo which i will transfer to real market soon.
MT4 DETAILs
server= ICMarkets-Demo02
Login = 20560852
password= rhew23

}

 
MT5-version
#define MT4_TICKET_TYPE // Обязываем OrderSend и OrderTicket возвращать значение такого же типа, как в MT4 - int.
#include <KimIVToMT5.mqh> // https://c.mql5.com/3/263/KimIVToMT5.mqh

#include "ind4to5.mqh" // https://c.mql5.com/3/277/ind4to5.mqh

bool ObjectSetText( const string name, const string text,
                    const int font_size = 0, const string font_name = NULL, const color Color = clrNONE )
{
  return(ObjectSetString(0, name, OBJPROP_TEXT, text) &&
         ((font_name == NULL) || ObjectSetInteger(0, name, OBJPROP_FONTSIZE, font_size)) &&
         ((font_name == NULL) || ObjectSetString(0, name, OBJPROP_FONT, font_name)) &&
         ((Color == clrNONE) || ObjectSetInteger(0, name, OBJPROP_COLOR, Color)));
}

#define NULL ""

#include "AEROSPINE.mq4" // https://www.mql5.com/en/code/24903
 
Gbenga Ayodele:

if (you have not done so)

                       {

Download any of the following MT4 demo account ant test it on their platform: 1...NPBFX MT4 demo 
2......ICMarkets MT4 Demo 
3.....Dukascopy MT4 Demo
Let us know if you have the same result.

                     } else{

The reason i called the trade comment "Daily Gamble " is because not all days end up with profit;

I am already testing it demo which i will transfer to real market soon.
MT4 DETAILs
server= ICMarkets-Demo02
Login = 20560852
password= rhew23

}

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?

Reason: