Examples\Fractals usage in EA

To add comments, please log in or register
jaffer wilson
766
jaffer wilson  

I am trying to make my EA based on the Fractals sample form the Indicator-->Examples folder. Here is the code that I tried:  

#include<Trade\Trade.mqh>

CTrade trade;

void OnTick()
  {
int test = iCustom(_Symbol,_Period,"Examples\\Fractals");
MqlRates rates_price[];

 if(rates_price.high == buff[0])
  {
  trade.Sell(0.1);
  }
   if(rates_price.low == buff[0])
   
   {
   trade.Buy(0.1);
   
   }
  }

I don't know why I can not able to trade with the signals that are produced by this code and the indicator. Any Idea and help? I am using MQL5

Anthony Garot
1824
Anthony Garot  
jafferwilson:

I am trying to make my EA based on the Fractals sample form the Indicator-->Examples folder. Here is the code that I tried:  

I don't know why I can not able to trade with the signals that are produced by this code and the indicator. Any Idea and help? I am using MQL5

This article may help:

https://www.mql5.com/en/articles/43

How to call indicators in MQL5
How to call indicators in MQL5
  • 2010.03.12
  • KlimMalgin
  • www.mql5.com
In MQL5 there are several ways to call indicators, and they are mostly carried out using IndicatorCreate() and iCustom() functions. Moreover, these functions only return indicator handle, and further work on indicators is done through it. So what is a handle? How to deal with IndicatorCreate() and iCustom() functions? And how your expert will...
jaffer wilson
766
jaffer wilson  
Anthony Garot:

This article may help:

https://www.mql5.com/en/articles/43

Thanks let me check this... I hope this works.

jaffer wilson
766
jaffer wilson  
Anthony Garot:

This article may help:

https://www.mql5.com/en/articles/43

Can you just get me a sample code that will help me understand how the indicator in the example folder --> Fractals work in the EA. Kindly show a small code so that I can used it the way. I have tried teh article what you have suggested already.

Kindly, help me.

To add comments, please log in or register