Download MetaTrader 5
To add comments, please log in or register
Learning MQL5? Start with documentation!
Gregory
71
Gregory 2014.06.08 19:41 

Hello,

I have different patterns for buy signals, i'm trying to save them in an array. The array would have "0" as value for each bar, except +1 when it's a buy signal bar and -1 for sell signal bar.

So i did : SignalHisto[i] = 0; by default, and = 1 or = -1 when i have my signal bars.

Now i try to test this on the chart, and want to put a dot on a bar when two bars before there was a signal bar :

if (SignalHisto[i+2] == 1)
{
ExtMapBuffer[i] = Low[i] - 1; // (will put a dot on the graph)
}
The problem now is that this doesnt work. It works with the code above "SignalHisto[i] == 1" then it will put the dot on my signal bar. But i cannot get the dot two bars after the signal...
Not sure why ?
Thanks!
Gregory
71
Gregory 2014.06.08 19:42  
Sorry but once you put SRC code, i couldn't get rid of it to write normally below!
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.06.08 23:55  
Before using SRC, press enter a few times. Then go up a few times and use SRC.
Keith Watford
Moderator
7887
Keith Watford 2014.06.09 06:37  
if (SignalHisto[i+2] == 1)
{
ExtMapBuffer[i] = Low[i] - 1; // (will put a dot on the graph)
}

Depends on what the chart instrument is

EG. if Low[i] on EURUSD is 1.3500, the buffer value will be 1.3500-1.0000, so 0.3500.

It will be way off the chart.

whroeder1
13596
whroeder1 2014.06.09 13:14  
GumRai:It will be way off the chart.
Exactly. Don't hard code numbers
ExtMapBuffer[i] = Low[i] - 1 * _Point; // (will put a dot on the graph)
Gregory
71
Gregory 2014.06.09 17:08  

Thanks, it's on GER30 chart, so the issue is not related to not displaying the dot.

I dont get it why this doesnt work :(

 

@deysmacro: thx for the tip :) 

/
To add comments, please log in or register