[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 953

 
Vinin, I apologise for the redundant posts, it's a lack of experience so far. I saw that I gave unnecessary posts, but I don't know how to delete them yet.
In my EA there are no hard and fast parameters, just sliders, stochastic, short term volatility, rate of trend increase and correlation with other currencies.
Of course, it is possible to simplify an EA, but it will be a different one. For example, we can take a pair of moving curves to determine the trend direction and use stochastics to work in the trend.
It is very simple and I can debug it, but I want something better.
Vinin, if I have the ability to immediately delete my erroneous posts from the forum,
I'm asking you to tell me how to do it.
If you have any tips on who to contact about genetic algorithms or know how to enter the forum thread on mechanical trading systems
(I tried to go there, but it has its own registration, and how to do this, I do not know),
I would be very grateful for any help.
 
granit77:
Not here, but here. You gave the link through "your own", it's not available to others.
Oops... :) Thanks, Victor.
 
Hooray it seems to have worked!!! The trawl close function, independent of the expansion of the DC stops. (Please don't judge the code severely... you can improve it
//+------------------------------------------------------------------+
//|  Линия                                                           |
//+------------------------------------------------------------------+
     void CheckForClose()
  {
  
   for(int i=0;i<OrdersTotal();i++)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false)        break;
      if( OrderSymbol()!=Symbol()) continue;
      //---- check order type 
      if(OrderType()==OP_BUY)
        {
         if(Bid== ObjectGet("LOSBAY", 1) ) OrderClose(OrderTicket(),OrderLots(),Bid,3,White);
         break;
        }
      if(OrderType()==OP_SELL)
        {
         if(Ask== ObjectGet("LOSSELL", 1) ) OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
         break;
        }
     }
//----
if(OrderType()==OP_SELL)
{
 ObjectCreate("LOSSELL", 1, 0, Time[0], Ask+LS*Point);
    if( ObjectGet("LOSSELL", 1)-Ask>LS*Point)    ObjectSet("LOSSELL", 1,  Ask+LS*Point);   
   }
if(OrderType()==OP_BUY)
{
  ObjectCreate("LOSBAY", 1, 0, Time[0], Bid-LB*Point);   
    if(Bid-ObjectGet("LOSBAY", 1)>LB*Point)      ObjectSet("LOSBAY", 1,  Bid-LB*Point);  
    }
    if (OrdersTotal()<1) ObjectDelete("LOSSELL");
    if (OrdersTotal()<1) ObjectDelete("LOSBAY");
  }
)
 
Still asking for help to finish. Changed a few lines... Buy trawls and closes perfectly, but Sell for some reason closes by itself immediately after opening, regardless of the LOSSELL line
     if(Bid<= ObjectGet("LOSBAY", 1) ) OrderClose(OrderTicket(),OrderLots(),Bid,3,White);
         break;
        }
      if(OrderType()==OP_SELL)
        {
         if(Ask>= ObjectGet("LOSSELL", 1) ) OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
         break;


 
Colleagues, could you please suggest an article or link that discusses how to correctly interpret EA test results? I have no idea how to do this.
 

How do I generate real time data for a Japanese candlestick chart?

So that the chart shows, for example, not EURUSD, but EURUSD minus the average.

 
double Lot=0.01;
datetime time;


void start() {

int Total;

double
Sar_1,
Sar_0;

bool
Opn_B=false,
Opn_S=false;


//----------------------------------------------------------------------------------
// Торговые критерии


for(int i=OrdersTotal()-1;i>=0;i--)
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)&&OrderSymbol()==Symbol()&&OrderType()>1)Total++;

if(Total!=0 || time==Time[1])return;


Sar_1=iSAR(NULL, 0, 0.03, 0.2, 1);
Sar_0=iSAR(NULL, 0, 0.03, 0.2, 0);




if (Sar_0 < Close[0] && Sar_1 > Close[1])
Opn_B=true;

if (Sar_0 > Close[0] && Sar_1 < Close[1])
Opn_S=true;



//-----------------------------------------------------------------------------
if (Opn_B)
{OrderSend(Symbol(),OP_BUY,Lot,Ask,0,0,0);time=Time[1];}

if (Opn_S)
{OrderSend(Symbol(),OP_SELL,Lot,Bid,0,0,0);time=Time[1];}

//----------------------------------------------------------------------------------



if (OrderType()==OP_BUY) {
if (Sar_0>Close[0])
OrderClose(OrderTicket(), Lot, 0, 0);
}
if (OrderType()==OP_SELL) {
if (Sar_0<Close[0])
OrderClose(OrderTicket(), Lot, 0, 0);
}
}


//-------------------------------------------------------------------------------------------
The EA opens a position when the Parabolic SAR position changes relative to price. It should close the position by the same principle, only it does not do so. Can you tell me what the problem is?
 
001:

Colleagues, could you please suggest an article or link that discusses how to correctly interpret EA test results? Thank you!

http://wellforex.ru/index/kak_ocenivat_torgovye_sistemy/0-16

How about this?

 

T.H.C.:

...How about this?

More like this.
 

Good day to all! Can someone tell me how to make a chart display the value of the Parabolic SAR indicator? Only not the current,

Or give me a link to something similar.

Reason: