[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 620

 
sanyooooook:
something like this, where the order is trawled by the calculated funk value
Thank you, let's see...
 

Guys, I don't get it... The postponements used to be deleted when they expired, but now they're not - they can stay in the tester for a year... What could be the reason?

I'm using the Kim's SetOrder function that sends me the required parameters:

SetOrder(string sy, int op, double ll, double pp,
              double sl=0, double tp=0, int mn=0, string co="", datetime ex=0)

I call it like this:

   double   tp;
   string   sy=Symbol();
   double pa=MarketInfo(sy, MODE_ASK);
   double pb=MarketInfo(sy, MODE_BID);
   double po=MarketInfo(sy, MODE_POINT);
//-------------------------------------------------------------------------------------         

   Magic=511;
   Lots_New=NormalizeLot(Lots/2, False, NULL);
   SetOrder(NULL, OP_SELLSTOP, Lots_New, Bid-DistORD*Point, 0, Bid-(DistORD+tp)*Point,Magic,TimeCurrent()+1*60*60);
// Функция для рассчёта Take Profit по ATR

//+------------------------------------------------------------------+
//|                  Take from ATR                                   |
//+------------------------------------------------------------------+
double TakeProfitATR (int tf)
  {
   double   atr   =iATR(NULL,tf,14,0);
   double   mltp  =45000;
   if (tf==5) mltp=45000;
   double   tp    =MathRound(atr*mltp);
   return  (tp);
  }

This is where I set the pending life time:

TimeCurrent()+1*60*60

1 = one hour, 2 = two hours, etc...
The most interesting thing is that everything worked before, but now it doesn't...

Should we normalize this expression that calculates the order setting price?

Bid-DistORD*Point

DistORD = 40.0; // Distance for placing an order

Sometimes error 4107 appears

 
If DistORD was intact, you don't have to, but you do.
 

The question of equity has been raised here recently... I got hooked on it a bit and this is what my research led to:


I used usual swing trading with additions by trend and locking of open positions.
I did not use StopLoss, Take was dynamic calculated using ATR, trailed all positions. For the main position I used trailing on parabolic (to tell the truth - not very good),
For scraps and lots I used a three-level exit system where upon reaching each level the position was closed in parts.

Without equity control, the system always failed in the middle to the end of the year. After equity control was enabled - here is the chart in front of you.

Each time equity increased by 5% compared to its initial value, all positions were closed completely and the counting started anew.


I think there is some information for discussion... Your thoughts, friends...

 
Help for newcomers here, move the discussion to another thread.
 
artmedia70:

I think there is some information for discussion here... Your thoughts, friends...



on a 24-hour demo

I don't know why, but in the tester my results are the same and not the demo completely different

 
Roger:
Help for newcomers here, move the discussion to another thread.
So this is where the question of equity was raised - so I'm posting the results of my research... And then, well, it's not interesting, so let's just leave it at that...
 
IgorM:


for 24 hours on the demo

I don't know why, but in the tester I have the same results, and not the demo completely different

Already standing on demo...
 

Need help!!! How to choose the last losing order from the history???

 
Roger:
If DistORD was intact, you don't have to, but you do.
And if we set DistORD type to int instead of double. Would it be correct to use it as an int variable in an expression where double variables are used ?
Reason: