Background: I developed a custom indicator to calculate the lot size to trade based on my entry price and stop loss price. This indicator worked fine before the major upgrade to the MQL4 language.
Current situation: I can attach the indicator to my chart and it works. When I close MT4 and restart, the indicator unattaches itself from the chart automatically. Previously, it would be attached to the the chart until I remove it or close the chart.
Can someone help me, please? I have attached the indicator.
Do you have any line printed in the logs relative to your indicator ? (See Experts and Journal tabs).
I got an error "divide by zero" when trying your code, on this line :
Lots = AccountBalance() * risk / (SLpips * PipValue * 10);
To add comments, please log in or register