SetIndexBuffer

ckm Forex
427
ckm Forex  

I am using Swing Indicator as a code to my EA to place buy and sell orders, but running the back test I get the following error:

SetIndexBuffer function must be called from custom indicator only........

Any clue on how to solve it.

Ray
2646
Ray  

Can't use indicator buffers in an EA.

ckm Forex
427
ckm Forex  

Yes Phy,

whats teh workaround then ?

I want to convert the indicator to my EA.

William Roeder
25322
William Roeder  
ckm Forex
427
ckm Forex  

I am using swing indicator, and its damn difficult to use it under icustom.

Thats why I am using it direct into my EA. Here is the swing indicator code, and I'll appreciate if someone can tell me how to use it in my ea as icustom. I simply want to place buy/sell orders as teh indicator places buy/sell arrows on the chart.

Any technical support would be lot appreciated, as I was not able to understand the buffer mappings of this indicator.

William Roeder
25322
William Roeder  

And decompiled code at that!

ckm Forex
427
ckm Forex  

Sir, I have already tried those articles on indicator/EA conversion, and I did try all possible ways of doing it. Still no success.

Seek hlep from somebody on how to map the buffers to place long/short orders and take icustom option, or if somebody can help converting this indicator into an ea.

[Deleted]  

Just a note, that decompiled code is most often a copywright infringement and not appreciated around here. You may consider removing it.

You don't need to decompile indicators to use them in EA's. iCustom is designed specifically to work with EX4 files. When you load the indicator onto a chart, the input tab of the dialogue box will list all the extern variables. these input values will need listing in order and seperated by a comma in the iCustom() call. With the indicator on the chart, the data window will show the indicator buffers in order starting from 0. so if the indicator has 2 lines, there will be 2 buffers, and you will need two iCustom()'s in the EA, one for each buffer 0 and 1.

hth

V

ckm Forex
427
ckm Forex  

Viffer, I agree with you on the copyright stuff. Don't know how to remove it from my post now?

On the buffer thing, the indicator has six buffers and none of them passes the buy/sell values. All i can get is the buy/sell signal, but on a 4H candle when does the signal come is not known. Also the price for buy/sell is not known. like the buy price is shown on the chart, it doesn't come out of the buffers. The indicator does all that internally through objectcreate stuff. So the indicator needs to be coded as an EA. Please comment if thats right.

ckm Forex
427
ckm Forex  
OK, I just removed the code.