Author: Copyright 2019, EvgDc
Indicators Used
Money flow indexRelative strength indexStochastic oscillator
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
MRS
ÿþ#property copyright "Copyright 2019, EvgDc"

#property link      "https://tradingbots.pro"

#property version   "1.00"

#property strict

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_plots   2

#property indicator_label1  "Red"

#property indicator_type1   DRAW_LINE

#property indicator_color1  clrRed

#property indicator_width1  2 

#property indicator_label2  "Blue"

#property indicator_type2   DRAW_LINE

#property indicator_color2  clrBlue

#property indicator_width2  2

int MaximusPower = 70;

double         Buffer1[];

double         Buffer2[];

int n = 0;

int TimeFrame = 0,

MfiHigh = 0, MfiLow = 0, RsiHigh = 0, RsiLow = 0, StochHigh = 0, StochLow = 0;



int OnInit()

  {

   SetIndexBuffer(0,Buffer1);

   SetIndexStyle(0,DRAW_LINE);

   

   SetIndexBuffer(1,Buffer2);

   SetIndexStyle(1,DRAW_LINE);

   

   SetIndexEmptyValue(0,-1); 

   SetIndexEmptyValue(1,-1);

   

   MfiHigh = MaximusPower;

   MfiLow = 100 - MaximusPower;

   RsiHigh = MaximusPower - 10;

   RsiLow = 100 - MaximusPower + 10;

   StochHigh = MaximusPower;

   StochLow = 100 - MaximusPower;   

   if(MaximusPower == 0){

      MfiHigh = 0; RsiHigh = 0; StochHigh = 0;

      MfiLow = 100; RsiLow = 100; StochLow = 100;  

   }

   

   return(INIT_SUCCEEDED);

  }

  

int start()

  {

   datetime TimeArray[];

   int    i,limit,y=0,counted_bars=IndicatorCounted();

 

// Plot defined time frame on to current time frame

   ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame); 

   

   limit=Bars-counted_bars;

   for(i=0,y=0;i<limit;i++)

   {

      if (Time[i]<TimeArray[y]) y++;

      

      double mfi = iMFI(NULL, TimeFrame, 14, y);

      double rsi = iRSI(NULL, TimeFrame,14,PRICE_CLOSE, y); 

      double stoch = iStochastic(NULL, TimeFrame,14,1,1,MODE_SMA,0,MODE_MAIN, y);

       

      if(mfi >= MfiHigh && rsi >= RsiHigh && stoch >= StochHigh){

         Buffer1[i] = High[i];

      } else Buffer1[i] = -1;

      if(mfi <= MfiLow && rsi <= RsiLow && stoch <= StochLow){

         Buffer2[i] = Low[i];

      } else Buffer2[i] = -1; 

     

     }

  

   return(0);

  }

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---