Attachments forums

List of attachments posted on this forum.


All files on forums: 161077

Re: MT4 Indicator requests and ideas

Jagg, Fri Jul 06, 2018 6:28 pm

rijay wrote: Fri Jul 06, 2018 4:03 pm


it seems to be working with your suggestion, thanks
Don't know why the user should hardcode here a MaxValue.

I have commented out the (extern double MaxValue... line) and added this in global space

Code: Select all

double window_top,window_bottom;
then added this in init() section

Code: Select all

window_top=WindowPriceMax()+iATR(Symbol(),PERIOD_D1,5,0);
window_bottom=MathMax(0,WindowPriceMin()-iATR(Symbol(),PERIOD_D1,5,0));
and changed the ObjectCreate from

Code: Select all

ObjectCreate(name,OBJ_RECTANGLE,0,times[i+1],0,lastTime,MaxValue);
to

Code: Select all

ObjectCreate(name,OBJ_RECTANGLE,0,times[i+1],window_bottom,lastTime,window_top);

I have added also a "ShowBadAngleZoneInMainChart" input setting. Whenever the angle is smaller than AngleLevel a zone is marked in the main chart (I want to trade only when we have a good slope/angle for example)...

Don't know if this is useful for someone else but I add my changed file here as attachement.
All files in topic