Diablo - page 10

 
// Diablo v28.09.10
#property copyright "Jon Katana"
#property show_inputs
extern double Up=0;
extern double Down=0;
extern int Levels=0;
extern int Step=0;
extern double Vol=0;
extern int Spread=0;
int start()
{for(int i=0;i<(Levels-1);i++)
{OrderSend(Symbol(),OP_BUYSTOP,Vol,Up+(2*i*Step+Spread)*Point,0,0,0,0,0);
OrderSend(Symbol(),OP_SELLSTOP,Vol,Down-2*i*Step*Point,0,0,0,0,0);
OrderSend(Symbol(),OP_SELLLIMIT,Vol,Up+(2*i+1)*Step*Point,0,0,0,0,0);
OrderSend(Symbol(),OP_BUYLIMIT,Vol,Down-((2*i+1)*Step-Spread)*Point,0,0,0,0,0);
OrderSend(Symbol(),OP_BUYSTOP,Vol,Up+(2*i*Step+Spread)*Point,0,Up+(2*i-1)*Step*Point,Up+(2*i+2)*Step*Point,0,0);
OrderSend(Symbol(),OP_SELLLIMIT,Vol,Up+2*i*Step*Point,0,Up+((2*i+1)*Step+Spread)*Point,Up+(2*Step*(i-1)+Spread)*Point,0,0);
OrderSend(Symbol(),OP_SELLSTOP,Vol,Down-2*i*Step*Point,0,Down-((2*i-1)*Step-Spread)*Point,Down-((2*i+2)*Step+Spread)*Point,0,0);
OrderSend(Symbol(),OP_BUYLIMIT,Vol,Down-(2*i*Step-Spread)*Point,0,Down-(2*i+1)*Step*Point,Down-2*Step*(i-1)*Point,0,0);}
return(0);}


Changes in Diablo v28.09.10:

+ improved profitability of trajectories of "one-way trend with strong pullback" type - now they are all profitable (in the previous version of the script - in one, the rest closed with zero), except the closest (to the second level and back), which closes at zero, as before;

+ the problem of the frequently encountered trajectory "level capture and trend in the opposite direction", the so-called "stop hit" has been completely solved - now all the trajectories of this type are profitable or close at zero (previously, capture of an odd level and trend in the opposite direction was closed with minus one corridor)

+ possible losses on the triangle flat have decreased even more (previously it was the most risky trajectory, now it is quite normal).

 
Almost all of the potential loss trajectories are concentrated within the first two levels. Therefore you should either reduce the Step value so that the price has time to pass through several corridors even with small movements, or, if at the end of the day a final negative corridor is formed, leave the orders for the next day so that Diablo will pull itself to zero or close with a profit.
 
JonKatana:
Almost all of the potential loss trajectories are concentrated within the first two levels. Therefore you should either reduce the Step value so that the price has time to pass through several corridors even with small movements, or, if at the end of the day a final negative corridor is formed, leave the orders for the next day so that Diablo will pull itself to zero or close with a profit.

Give the numbers for the order prices and volumes - for any round price - let's say 1.4000
 
JonKatana:

i.e. you insist that if price eventually moves beyond the two levels that were near the Diablo entry level, even if it takes a few days, then we're in the + or 0?
 
IgorM:

Give me the numbers for the spread of orders and volumes - for any round price - let it be 1.4000


well then i will have to answer it myself ;D

We do this:

//+------------------------------------------------------------------+
//|                                               Diablo_in_file.mq4 |
//|                                                            IgorM |
//|                               https://www.mql5.com/ru/users/igorm |
//+------------------------------------------------------------------+
#property copyright "IgorM"
#property link      "http://www.metaquotes.net"
#property show_inputs
extern double Up=0;
extern double Down=0;
extern int Levels=5;
extern int Step=100;
extern double Vol=0.1;
extern int Spread=18;
string FileName ="Diablo_in_file";

int start(){
int handle  = FileOpen(FileName ,FILE_CSV|FILE_READ|FILE_WRITE); 
               if ( handle ==-1 ) Print("Ошибка номер ",GetLastError()," при создании файла : "+FileName);
               else {
                     FileSeek(handle, 0, SEEK_END);
                     FileWrite(handle, "Запуск "+TimeToStr(TimeLocal(),TIME_DATE|TIME_MINUTES));
                     FileClose(handle);
               }


for(int i=0;i<(Levels-1);i++){
log(StringConcatenate(Symbol(),"OP_BUYSTOP / ",Up+(2*i*Step+Spread)*Point,0,0,0,0,0));
log(StringConcatenate(Symbol(),"OP_SELLSTOP / ",Down-2*i*Step*Point,0,0,0,0,0));
log(StringConcatenate(Symbol(),"OP_SELLLIMIT / ",Up+(2*i+1)*Step*Point,0,0,0,0,0));
log(StringConcatenate(Symbol(),"OP_BUYLIMIT / ",Down-((2*i+1)*Step-Spread)*Point,0,0,0,0,0));
log(StringConcatenate(Symbol(),"OP_BUYSTOP / ",Up+(2*i*Step+Spread)*Point,0,Up+(2*i-1)*Step*Point,Up+(2*i+2)*Step*Point,0,0));
log(StringConcatenate(Symbol(),"OP_SELLLIMIT /",Up+2*i*Step*Point,0,Up+((2*i+1)*Step+Spread)*Point,Up+(2*Step*(i-1)+Spread)*Point,0,0));
log(StringConcatenate(Symbol(),"OP_SELLSTOP / ",Down-2*i*Step*Point,0,Down-((2*i-1)*Step-Spread)*Point,Down-((2*i+2)*Step+Spread)*Point,0,0));
log(StringConcatenate(Symbol(),"OP_BUYLIMIT / ",Down-(2*i*Step-Spread)*Point,0,Down-(2*i+1)*Step*Point,Down-2*Step*(i-1)*Point,0,0));}
return(0);}

void log(string ss){
   int handle  = FileOpen(FileName ,FILE_CSV|FILE_READ|FILE_WRITE);
      if ( handle ==-1 ) Print("Ошибка номер ",GetLastError()," при создании файла : "+FileName);
      else {
            FileSeek(handle, 0, SEEK_END);
            FileWrite(handle, ss);
            FileFlush(handle);
            FileClose(handle);
      }
      
}

get it:

Run 2010.09.29 00:16
EURUSDOP_BUYSTOP / 1.35900000
EURUSDOP_SELLSTOP / 1.356900000
EURUSDOP_SELLLIMIT / 1.359800000
EURUSDOP_BUYLIMIT / 1.356100000
EURUSDOP_BUYSTOP / 1.35901.35781.360800
EURUSDOP_SELLLIMIT / 1.358801.361.35700
EURUSDOP_SELLSTOP / 1.356901.35811.354800
EURUSDOP_BUYLIMIT / 1.357101.35591.358900
EURUSDOP_BUYSTOP / 1.36100000
EURUSDOP_SELLSTOP / 1.354900000
EURUSDOP_SELLLIMIT / 1.361800000
EURUSDOP_BUYLIMIT / 1.354100000
EURUSDOP_BUYSTOP / 1.36101.35981.362800
EURUSDOP_SELLLIMIT / 1.360801.3621.35900
EURUSDOP_SELLSTOP / 1.354901.35611.352800
EURUSDOP_BUYLIMIT / 1.355101.35391.356900
EURUSDOP_BUYSTOP / 1.36300000
EURUSDOP_SELLSTOP / 1.352900000
EURUSDOP_SELLLIMIT / 1.363800000
EURUSDOP_BUYLIMIT / 1.352100000
EURUSDOP_BUYSTOP / 1.36301.36181.364800
EURUSDOP_SELLLIMIT / 1.362801.3641.36100
EURUSDOP_SELLSTOP / 1.352901.35411.350800
EURUSDOP_BUYLIMIT / 1.353101.35191.354900
EURUSDOP_BUYSTOP / 1.36500000
EURUSDOP_SELLSTOP / 1.350900000
EURUSDOP_SELLLIMIT / 1.365800000
EURUSDOP_BUYLIMIT / 1.350100000
EURUSDOP_BUYSTOP / 1.36501.36381.366800
EURUSDOP_SELLLIMIT / 1.364801.3661.36300
EURUSDOP_SELLSTOP / 1.350901.35211.348800
EURUSDOP_BUYLIMIT / 1.351101.34991.352900

run https://www.mql5.com/ru/code/9921

we have:

HOORAY! BIS! MAESTRO! YOUR SYSTEM IS BREAKEVEN! YOU CAN SAFELY TRADE!!!!!!!

It's true, with such a system of placing orders you have found exactly the way which led to a complete break-even of your system of placing orders, one thing is bad - I still have not smelt a profit, taking into account margin, I need to deposit 869 USD in my DC, As long as I put orders, profit more than 10 USD was never more, and taking into account spread and slippage piled up as a result -16 USD losses, the market has 32 orders, now formed a complete lock - wherever the price would have gone, we do not bear losses, but also profit then we do not see

As the result, I still don't get it - why should I invest 1k to get 10USD for some unknown day?

Files:
log.rar  2 kb
 
IgorM:


Yes, using such a system of placing orders you have found exactly the way which led to a complete break-even of your system of placing orders, one thing is bad - I still don't have a profit, taking into account margin, I have to deposit 869 USD in my brokerage company, As long as I put orders, profit more than 10 USD was never more, and taking into account spread and slippage piled up as a result -16 USD of losses, the market has 32 orders, now formed a complete lock - wherever the price would have gone, we do not bear losses, but also profit then we do not see

As the result, I still don't understand - why should I invest 1k of money to get 10USD for some unknown day?

The pairs of free orders (without Take Profit and Stop Loss), where Sell is higher than Buy, can be closed by the "Close by counter" command. Each such close releases part of the deposit, returns spreads and fixes a profit in the size of one corridor between orders. Pairs should be closed sequentially, moving either from the top to the bottom or from the bottom to the top along the vertical price scale.
 
JonKatana:
The resulting pairs of free orders (without Take Profit and Stop Loss), where Sell is higher than Buy, can be closed by the "Close counter" command. Each such close releases part of the margin, returns spreads and fixes profit in the size of one corridor between orders. Pairs should be closed sequentially, moving either from the top to the bottom or from the bottom to the top along the vertical price scale.


i think this is a great idea! If the price goes up, you buy, if it goes down, you sell!

The internet is all over the place:

Add to that the ever-growing number of private traders who trade from home, and you have a rapidly growing industry where you can make money on price movements up or down. Forex is a very liquid market and can absorb such transaction volumes that other markets look rather limited by comparison.

All! Get real with Diatlom now!

ZS: how would you explain in a simpler way that risk-free trading does not exist - in this thread you've shown yet another stupid example of risk-free trading - type all on mathematical calculations, like the trajectory of price movements, like the history have seen, but alas - in this thread avalanche, it smelled like profit, there was an increase in risk - increasing the volume of subsequent orders, to overlap the loss-making, but here - in this branch all "Here in this branch everything is "white and fluffy" - lot is fixed, levels are chosen by user, everything is cool! With the exception of profit - no, but no losses, and even if there is a profit it is entirely accidental - if the price follows the profit considerations, if it was too late, it means you have to wait for the theoretical breakeven, but if the deposit has to be larger to withstand a margin

 
I am studying the non-syndicated Expert Advisors - strategies. Now I got the consolidation levels for EURUSD, and what is interesting, I cannot get the linear indicators which can be taken from the ceiling. I am happy that I have found the maximum values between the nearest consolidations - at least the levels that are based on anything.
 
IgorM:


Great idea! How come I didn't know it immediately?! If the price goes up, we buy, if it goes down, we sell!

ZS: Topikstarter, how would you explain that risk-free trading can not be - in this thread you've shown yet another stupid example of non-syndikator trade - type all on mathematical calculations, like the trajectory of price movements, like the history have seen, but alas - in a branch of avalanche, it smelled profitable, there was an increase in risk - increasing the volume of subsequent orders, to overlap the loss-making, but here - in this branch, all "Here in this branch everything is "white and fluffy" - lot is fixed, levels are chosen by user, everything is cool! With the exception of profit - no, but no losses; even if there is a profit, it is illiquid and no more - if the price follows the profit considerations, it won't make it to the theoretical breakeven, but if the deposit is too big to withstand the margin

It does not matter where the price went after the formation of a pair of no-stop orders, where Sell is higher than Buy - above this pair or below. There is already a +1 corridor between these orders, only it is not fixed, as both orders are open. Such a pair of orders at adjacent levels can be closed by releasing the pledge and fixing the profit - they do not matter for Diablo anymore. In this case the collateral is small - instead of 32 orders you would have no collateral at all - all of them can be closed in pairs, releasing the spreads and making +16 corridors between orders in profit (+160 pips at your parameters).

There are much more profitable trajectories than those on which losses are possible.

 

Appeal to the administration: are we fed up with this profanity yet?

Or does the argument "there's an audience here" justify it?