the problem is that there is somewhere a logic error and i am not able to find it.
// treshold=10*Digits; 40 or 50 is not a valid price treshold=10*Point; // or treshold=10*pips2dbl; //++++ These are adjusted for 5 digit brokers. double pips2points, // slippage 3 pips 3=points 30=points pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init(){ if (Digits == 5 || Digits == 3){ // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
Hi,
Today i tryed to programm a indicator which draws trendline. the idea is following:
use all fraktals in the past 200 bars and the trendline is that one which is toucht by the most fraktals.
here is the code:
i know this try all and find the right is not the nicest code, but this is a proof of concept. the problem is that there is somewhere a logic error and i am not able to find it.
max.f1 and max.f2 are allways 0 and 1. (the first and the second fraktal in my array) with 19 touches...
maybe one of you can see the mistake..
thanks
//z
What is the error? Why are thinking the code is not working?
Remember iFractals is not like iMA in that the indicator value itself does not "persist" until market prices invoke a change in its value. iFractals will only generate a non-zero value for the candle in which a fractalup or fractaldown level is changed.
thx a lot. i don't know why i multiplicated with Digits instead of Points. i went a few times trough the whole logic but that line it seems i forgot.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
Today i tryed to programm a indicator which draws trendline. the idea is following:
use all fraktals in the past 200 bars and the trendline is that one which is toucht by the most fraktals.
here is the code:
i know this try all and find the right is not the nicest code, but this is a proof of concept. the problem is that there is somewhere a logic error and i am not able to find it.
max.f1 and max.f2 are allways 0 and 1. (the first and the second fraktal in my array) with 19 touches...
maybe one of you can see the mistake..
thanks
//z