Ward 6 - page 34

 
gpwr:
...

Drunk and without a defined profession: the market is a random wandering...

Add...

Plz, make edits... :-)

"Drunk and without a definite profession: the market is a casual wanderlust. Keep on drinking martinis and the like!" :-)

 
gpwr: Add...
Prostitutes on the market: the more you load up a client, the more likely you are to be at a disadvantage ))))
 
+ the longer you suck, the more likely you are to finally make a little profit ))))
 
Dr.Drain:
it seems it's time to put in a condenser? :-)))
It's time to create an indicator by formula.
 
DmitriyN:

Here is the code for the indicator based on the Swinosaurs function:


Made as it should be, matching is accurate, capacitances and resistances are self-selecting :

//+------------------------------------------------------------------+
//|                                                _2_DoidsSheme.mq4 |
//|           Copyright © 2012. XrustSolution. mail:xrustx@gmail.com |
//|          https://www.youtube.com/user/opmlv http://forexrust.info |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2012. XrustSolution. mail:xrustx@gmail.com"
#property link      "https://www.youtube.com/user/opmlv http://forexrust.info"
//+------------------------------------------------------------------+
//| Super Global Variables                                           |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
//+------------------------------------------------------------------+
//| Extern Variables                                                 |
//+------------------------------------------------------------------+
extern string  ЕмкостьКонденсатора          = "= Начальный период МА";
extern    int  Capacity                                     = 7      ;
extern string  СопротивлениеУтечки                  = " конденсатора";
extern double  Resistance_C1                                = 100    ;
extern string  Резистор_В_Цепи_Заряда               = " конденсатора";
extern double  Resistance_R1                                = 10     ;
extern string  Резистор_В_Цепи_Разряда              = " конденсатора";
extern double  Resistance_R2                                = 10     ;
extern string  Порог_пробоя_Варистора         = "Максимальный период";
extern double  SafePerid                                    = 100    ;
extern string  МетодСбросаЗаряда= "true=Ограничение/false=Сброс на 0";
extern   bool  ResetMetod                                   = true   ;
extern    int  MoovingMetod                                 = 0      ;
extern    int  MoovingPrice                                 = 0      ;
//+------------------------------------------------------------------+
//|   Includes                                                                  |
//+------------------------------------------------------------------+
//#include <OBJECTS_CLASSES.mqh>
//#include <AlertsAndSounds.mqh>//GetInfo("");          
//+------------------------------------------------------------------+
//|   Defines & Global variavles                                     |
//+------------------------------------------------------------------+
#define empty  EMPTY_VALUE

//+------------------------------------------------------------------+
//--- buffers
double diods[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void init(){
        //---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,diods);
        //----
return;}
//+------------------------------------------------------------------+
void deinit(){return;}
//+------------------------------------------------------------------+
void start(){
   //----
                
   //----
   static int preLimit=0;
   static double prerp = 0;         
   int i, ii, x, y, counted = IndicatorCounted();
   if (counted > 0) counted--;
   int limit = Bars - counted;
   int per   = Period();
   string sy = Symbol();
   string txt="";
   double res=0,pres=0,diff=0,pdiff=0,koff=0;
   if(limit<=preLimit){limit=preLimit+1;}
        //----
   for(i=limit;i>=0;i--){
        res = iMA(sy,per,1,0,MoovingMetod,MoovingPrice,i);
        diff =  MathAbs(res-iMA(sy,per,1,0,MoovingMetod,MoovingPrice,i+1));
        if(diff > pdiff){
          koff+=MathAbs(diff-pdiff)/Resistance_R1;
        }else
        if(diff < pdiff){
          koff-=MathAbs(diff-pdiff)/Resistance_R2;
        }
        koff-=1/Resistance_C1;          
        
        pdiff=diff;
        if(koff>SafePerid){
          if(ResetMetod){
             koff = koff-SafePerid;
          }else{
             koff = 0;
          }   
        }
        if(koff<-(Capacity-1)){koff=-Capacity+1;}
        if(Capacity+koff>preLimit){preLimit = Capacity+koff;}
        diods[i] = iMA(sy,per,Capacity+koff,0,MoovingMetod,MoovingPrice,i+1);
   }
   //----
return;}
//+------------------------------------------------------------------+
 

I've changed the circuit too:

 
Dr.Drain:

Let me explain, for ...er...those in the dark. The formula describes the discharge of a capacitor by an exponential decaying to zero at infinity, as it should.

P.S. And here's the charge:


The general view is shown, it is clear that there are more parameters in exponent exponent if under t we mean time.


Absolute converter - write for sure.
 
FAQ: I also changed the circuit:

What's the varistor for? To protect the capacitor from a lightning strike?
 
Supposed to be by circuit, and for a chart = limit on period increase, with gep for example, for incoming voltage we have acceleration going. so gep == MOLNION :))
 
I just don't know... I'm starting to wonder if this is the right thing to do... Here, if the acceleration increases, the MA will slow down and vice versa.
Reason: