ok..I'm working on it... but you assume I know MUCH more that I do.
Attached is my whole indicator program so far. How would I put your code into it? Or do I create a whole new program?
I tried sticking it in the best I could, but I can't compile. It doesn't like the double dGap=10*Point even after I put a ; after it.
And there was a ton of other compiling errors. I guess I'm just dense enough to not know what to do now.
Just download my code, copy it to your MT4 directory structure in Indicators. stop and restart MT4 then add the Indicator to a chart . . if you are using Indicator buffers you don't use objects.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I still haven't figured out the indicator buffers yet,
but the following code does what I want, display current and past bar Heiken Ashi color.
What it doesn't do is put it in a separate window, and display ONLY under the current bar.
is that possible? Or do I still need to figure out the indicator buffer?
You are dealing with a very green newbie... thanks for the patience.
int start()
{
ObjectsDeleteAll();
// clear the chart before drawing
// 5 min current
double open.5.0 =iCustom(NULL,1,"Heiken Ashi",0,2,0); //Previous Open
double close.5.0 =iCustom(NULL,1,"Heiken Ashi",0,3,0); //Previous Close
bool Up.5.0 = (close.5.0>open.5.0);
bool Down.5.0 = (close.5.0<open.5.0);
// 5 min past
double open.5.1 =iCustom(NULL,1,"Heiken Ashi",0,2,1); //Previous Open
double close.5.1 =iCustom(NULL,1,"Heiken Ashi",0,3,1); //Previous Close
bool Up.5.1 = (close.5.1>open.5.1);
bool Down.5.1 = (close.5.1<open.5.1);
ObjectCreate("square1",OBJ_RECTANGLE, 0, TimeCurrent(), Ask-0.001, 0, Bid-0.001);
if(Down.5.0 == 1) ObjectSet("square1",OBJPROP_COLOR,Red);
ObjectCreate("square1",OBJ_RECTANGLE, 0, TimeCurrent(), Ask-0.001, 0, Bid-0.001);
if(Down.5.0 == 0) ObjectSet("square1",OBJPROP_COLOR,White);
ObjectCreate("square2",OBJ_RECTANGLE, 0, TimeCurrent(), Ask-0.0015, 0, Bid-0.0015);
if(Down.5.1 == 1) ObjectSet("square2",OBJPROP_COLOR,Red);
ObjectCreate("square2",OBJ_RECTANGLE, 0, TimeCurrent(), Ask-0.0015, 0, Bid-0.0015);
if(Down.5.1 == 0) ObjectSet("square2",OBJPROP_COLOR,White);
return(0);
}
Please use this to post code . . . it makes it easier to read.
I still haven't figured out the indicator buffers yet,
but the following code does what I want, display current and past bar Heiken Ashi color.
What it doesn't do is put it in a separate window, and display ONLY under the current bar.
is that possible? Or do I still need to figure out the indicator buffer?
something like this
I'm not good with Indicators . . . take a look at this see if it gives you what you need . . .
ok..I'm working on it... but you assume I know MUCH more that I do.
Attached is my whole indicator program so far. How would I put your code into it? Or do I create a whole new program?
I tried sticking it in the best I could, but I can't compile. It doesn't like the double dGap=10*Point even after I put a ; after it.
And there was a ton of other compiling errors. I guess I'm just dense enough to not know what to do now.
ok..I'm working on it... but you assume I know MUCH more that I do.
Attached is my whole indicator program so far. How would I put your code into it? Or do I create a whole new program?
I tried sticking it in the best I could, but I can't compile. It doesn't like the double dGap=10*Point even after I put a ; after it.
And there was a ton of other compiling errors. I guess I'm just dense enough to not know what to do now.
where do I download your code?
see how dense I am?
where do I download your code?
see how dense I am?
this is nearly perfect. I have been playing with it, and having a ball.
I think I might have murdered it, but I now have it putting the squares in a separate window.
That part is working perfectly. Now... I can't figure out how to have all the squared in a perfect line.
Because, I want to put another line under that one. I think I can figure out how to do that... at least I will have fun trying.
the new line will be a larger time frame. And 3rd line would be yet another larger time frame.
Here's the way your ea looks after I have played with it. Can you tell me how to put the squared in a straight line. ?
Thanks
ps... I've been playing with this for a while, and I can't figure out how to get a second and third line, and make them straight.
If you could help me with that I would appreciate it. 2nd file is my attempt at the second line.