problem with arrays...

 

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!
 
Sorry but once you put SRC code, i couldn't get rid of it to write normally below!
 
Before using SRC, press enter a few times. Then go up a few times and use SRC.
 
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.

 
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)
 

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 :) 

Reason: