A) you are calling iCustom 9 times - 4 will return identical results and 5 will return another 'set' of identical results
B) you are only ever returning the same 1 (of 8 possible) indicator values from iCustom
C) you are not passing any input parameters into your iCustom call.
Try something like
double Var1 = iCustom(NULL, 0, "New1S", myDoubleParam, myStringParam, myIntParam, myIndexOfReturnedIndicatorValue, Current + 0);
Note that, if the indicator draws up & down arrows at various places, it's possible that 'no arrow' is done via EMPTY_VALUE (0x7FFFFFFF = 2147483647). It is not the same as 0.
Perhaps 'up' arrow will be myIndexOfReturnedIndicatorValue of 0 & 'down' = 1 (OR ANYTHING IN RANGE 0 TO 7)
----
These just relate to iCustom issues.
As to your logic, it's impossible to help you without knowing at least which indicator index does what.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have an indicator that i called New1S and im running it on ICustom it has 3 input parameters double,String, Int and i need it to buy when signal up and sell when signal down, it looks like a pivot point with arrows, i tried back testing it and it only makes one trade but in the middle of both arrows could you help tell me what im doing wrong or how i could make it open and buy on the ⇧ signal, and Sell on the down ⇩ This is the code with ICustom