[Archive!] WRITING A COUNTRY TOGETHER!!! - page 12

 
alderru >> :

OK, I can see where you got the formula and the terms "strength" from: your assumption is that the market is in an equilibrium state and if there is a gain somewhere, there is a loss somewhere. I agree, I'm of that opinion too.

Finally, at least someone understands... And this system is also closed, i.e. everything is cooked in one volume, I mean only 6 pairs, NOT MORE! Of course, we can change pairs, for example, instead of yen we put franc, so there will be euro-franc and pound-franc crosses instead of euro and pound-franc.

 
alderru >> :

And how will you choose a "strong" pair? when its line is higher than everyone else's? by absolute value? when it exceeds a certain threshold?

Sorry again, now for the nerdiness ;-) It's just that I created such an indicator, I calculated it in my own way, but I failed to draw any logical conclusions.

Of course... If above all, then stronger, below weaker...

I haven't made any logical conclusions yet either, but I have a feeling there's something behind it. I don't know what it is yet, but the system is self-locking and I just need to find the key. I have only built MTS on this idea before developing the indicator, without any additional tools. My Profit Factor was 4.6 in 2008 and 1.7 in 2000. However, I didn't understand how the system worked, because it was difficult to analyze deals without the use of the indicator. Then I gave up the idea, but now I am thinking of rethinking it.

 
RomanS писал(а) >>

Of course... if the highest is the strongest, the lowest the weakest...

Of course, if there is only one pair and growth is clearly visible, but what if several pairs go up and then begin to overlap at the maximum value - one or the other?

This was the case in my experience. If you open when the indicator of a pair is above the others (I'm not saying that it's too late) and close when it moves to the second place (together with opening a deal on a new pair) - you get such a mess.

True, I used 7 pairs to increase reliability (?) of indicators. Something like clusters.

And by the way, question: how did you build your MTS (and even make a profit) without understanding what it counts there? Usually, IMHO, first you think out a strategy, then back it up with an indicator (if you are not sure), and then use the MTS (well, at least I do). And you have it the other way round ;-)

 

I downloaded Vinin indicator with your permission and put it on the chart.

I have a question, is it the indicator itself that messes up or MT4 from "..." company perceives foreign bodies so aggressively?


 
Night_Sun >> :

I downloaded, with your permission, the Vinin indicator, put it on the chart, it turns out to be complete nonsense.

I have a question, is it the indicator itself, it fails or MT4 from "..." company takes so aggressively foreign bodies?

This code fails to add int start()


int start()
  {
    ArrayInitialize( Buffer0,0.0);
    ArrayInitialize( Buffer1,0.0);
    ArrayInitialize( Buffer2,0.0);
  //...............
  //..............
  //...............
  //..............

  return(0);
  }
 
alderru >> :

Of course, if there is only one pair and growth is evident, but what if several pairs climb up and then begin to overlap at the maximum value - one or the other?

First of all, in this indicator it is not pairs that are rising, but currency indexes (not to be confused with indexes like DXY etc.) as you can see from the chart (and by definition) only 2 curves may be above zero, not more. Therefore neither 3 nor 4 curves can crawl upwards.

In general, the indicator has been created to answer the question: "If EURUSD grows, what causes this growth? Weakening of the dollar or rise of the euro?


 
alderru >> :

And by the way, a question: how did you build your MTS (and even make a profit) without understanding what it counts? Usually, IMHO, first you think out a strategy, then you back it up with an indicator (if you're not sure), and then you attach an MTS (well, at least that's what I do). And you have it the other way around ;-)

The MTS idea was that the signal to close the position was to open a new one + emergency close (just in case). It worked without stops and Take Profits. It simply opens/closes when a signal is received. She could hold position for several hours, and sometimes even for a couple of weeks at once withdrawing 600 points. However, I have my doubts that it worked not exactly the way I wanted it to due to my mistake in the code. Maybe thats why it worked so profitable :)))

The average profitable trade was more than 3 times the average losing trade. I don't remember exactly, but it was more than 50% profitable!

 

For example, I just sketched out a simple Expert Advisor on the above indicator in about 5 minutes. Just open buy when the green curve is higher than all and the black one is lower than all and open sell when it is the opposite. Stop and profit are fixed. Here are the results for 2008.

Here is the code

//+-----------------------------------------------------------------------+
//|                                                    Мультивалютный.mq4 |
//|                                                         Roman Strukov |
//|                                                        srb-78@mail.ru |
//+-----------------------------------------------------------------------+
#property copyright "Roman"
#property link      "srb-78@mail.ru"

  extern double Period_MA  = 900; // значыение для М5 (не оптимизировалось взято от балды)
  extern double Lot        = 1;    
  extern int    StopLoss   = 1200;
  extern int    TakeProfit = 1000;
  extern string SYMBOL     = "EURUSD";

  int start() 
  { 
   int Ticket; 
   double USD, EUR, GBP, JPY, BID, ASK, SL, TP;
   bool Trade = true, Open_Bay = false, Open_Sell = false;
  
 // Анализ состояния рынка
     RefreshRates();
     USD = -(iClose("EURUSD",NULL,0)-iMA("EURUSD",NULL, Period_MA,0,1,0,0))-
            (iClose("GBPUSD",NULL,0)-iMA("GBPUSD",NULL, Period_MA,0,1,0,0))+
            (iClose("USDJPY",NULL,0)-iMA("USDJPY",NULL, Period_MA,0,1,0,0))/iClose("USDJPY",NULL,0);
     EUR =  (iClose("EURUSD",NULL,0)-iMA("EURUSD",NULL, Period_MA,0,1,0,0))+
            (iClose("EURUSD",NULL,0)*iClose("USDJPY",NULL,0)-iMA("EURUSD",NULL, Period_MA,0,1,0,0)*iMA("USDJPY",NULL, Period_MA,0,1,0,0))/iClose("USDJPY",NULL,0)+
            (iClose("EURUSD",NULL,0)/iClose("GBPUSD",NULL,0)-iMA("EURUSD",NULL, Period_MA,0,1,0,0)/iMA("GBPUSD",NULL, Period_MA,0,1,0,0))*iClose("GBPUSD",NULL,0);
     GBP =  (iClose("GBPUSD",NULL,0)-iMA("GBPUSD",NULL, Period_MA,0,1,0,0))+
            (iClose("GBPUSD",NULL,0)*iClose("USDJPY",NULL,0)-iMA("GBPUSD",NULL, Period_MA,0,1,0,0)*iMA("USDJPY",NULL, Period_MA,0,1,0,0))/iClose("USDJPY",NULL,0)-
            (iClose("EURUSD",NULL,0)/iClose("GBPUSD",NULL,0)-iMA("EURUSD",NULL, Period_MA,0,1,0,0)/iMA("GBPUSD",NULL, Period_MA,0,1,0,0))*iClose("GBPUSD",NULL,0);
     JPY = -(iClose("USDJPY",NULL,0)-iMA("USDJPY",NULL, Period_MA,0,1,0,0))/iClose("USDJPY",NULL,0)-
            (iClose("EURUSD",NULL,0)*iClose("USDJPY",NULL,0)-iMA("EURUSD",NULL, Period_MA,0,1,0,0)*iMA("USDJPY",NULL, Period_MA,0,1,0,0))/iClose("USDJPY",NULL,0)-
            (iClose("GBPUSD",NULL,0)*iClose("USDJPY",NULL,0)-iMA("GBPUSD",NULL, Period_MA,0,1,0,0)*iMA("USDJPY",NULL, Period_MA,0,1,0,0))/iClose("USDJPY",NULL,0);

 // Критерии открытия позиций по EURUSD 
 if ( USD> EUR && USD> GBP && USD> JPY && EUR< USD && EUR< GBP && EUR< JPY) Open_Sell = true;
 if ( USD< EUR && USD< GBP && USD< JPY && EUR> USD && EUR> GBP && EUR> JPY) Open_Bay = true;

 // Открытие позиций
 RefreshRates();                                
 ASK = MarketInfo( SYMBOL,10);
 BID = MarketInfo( SYMBOL,9);
 if ( Open_Bay == true && OrdersTotal()==0)
   {
    SL = ASK - StopLoss*Point;
    TP = BID + TakeProfit*Point;   
    Ticket = OrderSend( SYMBOL,OP_BUY, Lot, ASK,20, SL, TP);         
   }

 if ( Open_Sell == true && OrdersTotal()==0)
   {
    SL = BID + StopLoss*Point;
    TP = ASK - TakeProfit*Point;       
    Ticket = OrderSend( SYMBOL,OP_SELL, Lot, BID,20, SL, TP);         
   }
  return;       
 }
  
 
  

The code was written in this thread that it is very long and complicated ))))

As you can see, the Expert Advisor is just elementary and cannot be called disastrous (at least according to the chart).

It has many disadvantages ... For example, it closes profitable positions and immediately opens another one in the same direction :)

So, you can try to wind it up as suggested above, maybe someone has the desire to try

 

For example with Vinin's momentum

By the way Victor, don't you want to try adding an impulse to the opening criterion?

Take profit with stop, then we can remove it and make the entry criterion - the beginning of the impulse and the exit criterion - the end of the impulse.

 
RomanS писал(а) >>

For example with Vinin's momentum

By the way Victor, don't you want to try adding your custom impulse to the position opening criterion?

Take Profit with Stop, then we can remove it and make the entry criterion - the beginning of impulse and exit criterion - the end of impulse.

Well, I think it would be better to use 2MA_WPP. Or rather 2MA_WPP (but it does not exist yet, I need to do it)