Buy stop Sell stop Grid advisor as a class - page 5

 
George Merts:

So.

I have Windows7 x64, account control is disabled. I have to connect to the Storage every time I log in to the meta-editor.



Removal of service files "experts.dat" and "mql5.storage" had no effect. In general, there is an obvious storage problem on Windows7 x64 with disabled account control. An application has been sent to ServiceDesk.

 
Dennis Kirichenko:

Vladimir, please add me to the project as well. Thank you


Added.

 

Looking at the project, I usually inherit a class from CObject, it may come in handy in future development

class CBuyStopSellStopGrid : public CObject
{
//....
};

***

 
Alexey Volchanskiy:

Looking at the project, I usually inherit a class from CObject, it may come in handy in future development

***


I haven't done inheritance on purpose yet - the EA's prospects are still vague :) . When I need it, I'll add inheritance right away.

 
Vladimir Karputov:

I haven't done inheritance on purpose yet - the EA's prospects are still vague :) . When I need it, I will add inheritance.


of course

SZZ: I am adding a version of gridiron with a slightly different algorithm - when price goes up, buy stop and sell limit are set at price + const and at a close distance from each other. To be honest, I do not believe it will give me profit in the raw form, but I can post tests for comparison. I can't do the code, it's a paid order.

I take it that this EA doesn't give a profit yet?

 

Vladimir, I wanted to ask you this. Why didn't you use the SB's know-how? There is a class of CExpert Expert Advisor there.

Then, imho, when there is a grid of orders, wouldn't it be better to process it using CList?

Well, I would do so:

class CBuyStopSellStopGrid : public CList
 {

 }

And the grid order itself:

class CGridOrder : public CObject
 {

 }

That's my thoughts so far...

 
Alexey Volchanskiy:

of course

SZZ: I'm now completing the customer's version of the grid with a slightly different algorithm - when the price rises, they put a buy stop and sell limit at the level of price + const and at a close distance from each other. To be honest, I do not believe it will give me profit in the raw form, but I can post tests for comparison. I can't do the code, it's a paid order.

I guess this EA does not give any profit so far?


I'm experimenting for now. I'm thinking based on extended totals.

Forum on trading, automated trading systems and strategy testing

Buy stop Sell stop Grid Expert Advisor as a class

Vladimir Karputov, 2017.10.01 07:27

For step 35 extended totals:

Direction_of_trades_EURUSD_35

Here we can see that

  • almost 50% of all cases are when the length of uninterrupted trades equals "1". So we have situations like: opened Buy and then reversed the position (i.e. closed Buy with a loss and opened Sell) or this situation: opened Sell and then reversed the position (i.e. closed Sell with a loss and opened Buy). Thus situations with uninterrupted trades of length "1" are a guaranteed loss.
  • Approximately 25% of all cases with the length of uninterrupted trades equaling "2", by the following example: we opened Buy, then opened another Buy and reversed the position (i.e. closed two Buy and opened Sell - resulting in a loss equal to zero).

I think these most numerous categories (the length of uninterrupted trades equal to "1" and "2") must be thought over in details to correct the strategy of placing Stop pending orders.


We will need to develop it further: for example, gather additional statistics on how often "1,1" combinations occur in a row - i.e. how many flips there may be in a row.

 
Dennis Kirichenko:

Vladimir, I wanted to ask you this. Why didn't you use the SB's know-how? There is a class of CExpert Expert Advisor there.

Then, imho, when there is a grid of orders, wouldn't it be better to process it using CList?

Well, I would do so:

And the grid order itself:

These are my thoughts so far...


There is actually no grid. There are always only two pending stop orders: buy stop and sell stop.

 

The Expert Advisor places two pending orders each.

Now comes the fun part: managing open positions! All openings (no matter which position was opened first - Buy or Sell) come down to a simple scheme:

In the second step we have a loss on sell

And the most important question: what to do and who is to blame?

 
The tool has a low volatility, it makes sense to work on a breakout (limit orders) if the instrument is volatile, then work on a breakthrough(stop orders).


Sincerely.