Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1123

 
MrBrooklin:

You have already been answered. Why are you repeating the question?

 

Forum on Trading, Automated Trading Systems and Strategy Tests

Questions from beginners MQL5 MT5 MetaTrader 5

Sergey Tabolin, 2019.09.10 10:04

You have already been answered. Why are you repeating your question?

Hello Sergei!

Who answered?

Respectfully, Vladimir.

 

I looked through all the posts after my question a few more times, but I didn't see an answer anywhere.

Respectfully, Vladimir.

 
MrBrooklin:

It seems that this signal module (<Expert\Signal\SignalITF.mqh>) cannot be used on its own, as it always produces results.


What to do: generate an EA based on another trading signal module (e.g. iMA or iMACD) and see how the pending orders behave.

 

Forum on Trading, Automated Trading Systems and Strategy Tests

FAQ from Beginners MQL5 MT5 MetaTrader 5

Vladimir Karputov, 2019.09.10 11:44

It seems that this module of signals (<Expert\Signal\SignalITF.mqh>) cannot be applied independently, as it always gives results.


What to do: Generate an EA based on another module of trading signals (eg, iMA or iMACD) and see how the pending orders behave.

Thank you, Vladimir for the tip!

Sincerely, Vladimir.

 

Forum on Trading, Automated Trading Systems and Strategy Tests

FAQ from Beginners MQL5 MT5 MetaTrader 5

Vladimir Karputov, 2019.09.10 11:44

It seems that this module of signals (<Expert\Signal\SignalITF.mqh>) cannot be applied independently, as it always gives results.


What to do: Generate an EA based on another module of trading signals (eg, iMA or iMACD) and see how the pending orders behave.


Yes, Vladimir, you were right, the Expiration of pending orders (in bars) function has started to work with the addition of iMA. Thanks again!

Regards, Vladimir.

 
In the ohlc tester on m1, ontick is executed 4 times per minute, how to make it test only on the closing minutes, ohl-skip ?
 

Hello, I want to calculate the lot size depending on the desired profit in money, with takeprofit in pips = TP, the required profit in money = S

If I divide S by TP, it is not correct.

What is the correct way?

 
macleta:

Hello, I want to calculate the lot size depending on the desired profit in money, with takeprofit in pips = TP, the required profit in money = S

If I divide S by TP, it is not correct.

What is correct?

For the loss size, here is the function

/*****************Функция определения размера лота*******************/
double RiskLots(double risk, int SL)
{
  double RiskMony, Lot;
  double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
  double margin = SymbolInfoDouble(_Symbol, SYMBOL_MARGIN_INITIAL);
  double FreeMargin = AccountInfoDouble(ACCOUNT_MARGIN_FREE);
    long accountLeverage = AccountInfoInteger(ACCOUNT_LEVERAGE);
    RiskMony = floor(FreeMargin*risk/100);
     Lot = NormalizeDouble(RiskMony*_Point/ndd(SL*_Point*tickValue), 2);
  return(Lot);
}/*******************************************************************/

All you need to do is replace SL with TP

 
Alexey Viktorov:

For loss size, here is the function

Simply replace SL with TP

Thank you,nddis what?