ICUSTOM : get the right data

 

Hi!

and thanks in advance for everyone who's givin' up his time supportin' the community.

I got the Supertrend-Indicator

https://www.mql5.com/en/code/576

i'm not good at programming with MQL5 so if i'm wrong approach, could you give a simple example?

The strategy is simple, I want to open only buy positions when the trend is positive, and only sell positions when it is negative.


  SuperTrendHandle=iCustom(NULL,0,"supertrend",10,3,false);

  return(INIT_SUCCEEDED);

  ArraySetAsSeries(Supertrend,true);

  CopyBuffer(SuperTrendHandle,3,0,1,Supertrend);

  double SUPERTRENMIO = Supertrend1[0];

  Comment(Supertrend[0]); // i used this to try to see which type of value i got.


   SetIndexBuffer(0,Filled_a,INDICATOR_DATA);

   SetIndexBuffer(1,Filled_b,INDICATOR_DATA);

   SetIndexBuffer(2,SuperTrend,INDICATOR_DATA);

   SetIndexBuffer(3,ColorBuffer,INDICATOR_COLOR_INDEX);

   SetIndexBuffer(4,Atr,INDICATOR_CALCULATIONS);

   SetIndexBuffer(5,Up,INDICATOR_CALCULATIONS);

   SetIndexBuffer(6,Down,INDICATOR_CALCULATIONS);

   SetIndexBuffer(7,Middle,INDICATOR_CALCULATIONS);

   SetIndexBuffer(8,trend,INDICATOR_CALCULATIONS);


SuperTrend
SuperTrend
  • www.mql5.com
Value Charts Value Charts is a detrended price indicator, it shows the overbought and oversold states using the detrended price extremes. 3LineBreak The indicator that paints the bars in blue for a bullish trend and in red for a bearish one.
 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

 
i solved the problem! thanks!
 
RicTRAD3: i solved the problem! thanks!

Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?

How To Ask Questions The Smart Way. 2004
     When You Ask.
          Follow up with a brief note on the solution.

 

aboso;utely right ,

I have seen members asking for help , and try to get informatiom  or ssolution for the problem.. 

once they get it , may not be from the forum, but just vanish with a single line ...


" i got the solutiom  " or | i solved the problem'' .


How selfish is that , they dont want to share the solution and just run away...

Reason: