Market: no trading operations - page 7

 
Vitaly Muzichenko:

Build a normal function with a lot return, not a true/false check

And he likes to do extra checks. You have to check if it's a strategy tester, then check additionally what thecheckVolumeValue function returned...

 
Evgeny Belyaev:

Are you reading diagonally?

Any more questions for me?

Where's your grail when we see the signal?

You didn't dump your EAs into the Market, judging by the composition of the products.

so...

hello

;)

 
Vladislav Andruschenko:


Well, there shouldn't be a problem with that then.

the same multicurrency, passes the test.

And no trading operation may be from the tester's mood :-) - I don't know if he is in a bad mood (i.e. refreshing, sleeping, having a day off) and he doesn't make any trade.

It is enough to try a different spread or wait a day and it skips everything again in the mood.

I am checking without any problems, the functions are working perfectly. Removed the check for the minimum lot, it was so that if the minimum allowed more than 0.01, then do not trade.
In the validator, I saw a lot greater than 0.01, so I didn't trade.

 
Renat Akhtyamov:

You didn't dump the EA into the Market, judging by the composition of the products

so...

hello

;)

Well, I did, so that's another bummer. Do you want the link or do you want to find it yourself?

Where's your grail when we see the signal?

I even did a job for a man.


 

Look, I have owls first lot is taken from settings which means it can be less than allowed only if user made a mistake when entering lot.

For example, user made a typo and wrote 0.005 while he wanted to trade 0.05 lot - if you check it, owls will trade 0.01 lot (assuming that 0.01 is min lot)

And when I check a user will receive a print about an incorrectly entered lot, you can add an alert, just in case.

I believe that this is a matter of personal decision, who wants so and so ....

By the way, here's part of the code (I also wrote earlier) when checked also failed:

double CheckVolumeValue(double volume)
{
   double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   if(volume<min_volume)
   {
      Print("Volume is less than the minimum");
      return(min_volume);
   }

   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
   if(volume>max_volume)
   {
      Print("Volume is greater than the maximum");
      return(max_volume);
   }
 ......

}
 
Evgeny Belyaev:

I kind of did, so that's a bummer again. Do you want the link or can you find it yourself?

Where's your grail when we see the signal?

I prefer not to talk to idea hunters on such topics

 
Renat Akhtyamov:

I prefer not to talk about this kind of stuff with idea hunters.

Why are you talking then? )

You're boring me. We are all waiting for a signal with calculated volumes from CME. Isn't there clearing on the CME?

 
Maksim Neimerik:

Look, I have owls first lot is taken from settings which means it can be less than allowed only if user made a mistake when entering lot.

For example, user made a typo and wrote 0.005 while he wanted to trade 0.05 lot - if you check it, owls will trade 0.01 lot (assuming that 0.01 is min lot)

If you want to trade at 0.005 and wanted to trade at 0.05 - you may add an alert.

I believe that this is a matter of personal decision, who wants so and so ....

By the way, here's part of the code (I've also written before) when check also failed:

You have to do everything first, and then check for min/max

double CheckVolumeValue(double volume)
{
   double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
 ...

   if(volume<min_volume)
   {
      Print("Volume is less than the minimum");
      return(min_volume);
   }

   
   if(volume>max_volume)
   {
      Print("Volume is greater than the maximum");
      return(max_volume);
   }
}

and immediately at return do normalization

return(NormalizeDouble(volume,LotDigit(symb)));
 
Vitaly Muzichenko:

Do everything first, and then check for min/max

and then do the normalisation immediately on return.

In general, okay, it's time to end this conversation.

Some imaginary defects you saw right away, but the essence (I wrote about the return of the lot) has remained without your attention ...

Thank you all for your help!

 
Maksim Neimerik:

All in all, it's time to end this conversation.

Some imaginary faults you saw at once, but the essence (I wrote about the return of the lot) was left without your attention...

Thank you all for your help!

Maxim, can you hear me?

Reread the code I gave and its message

Forum on trading, automated trading systems and testing of trading strategies

Market: No trading operations

Vitaly Muzichenko, 2020.01.27 18:37

You have to do everything first, and then check for min/max.

double CheckVolumeValue(double volume)
{
   double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
 ...

   if(volume<min_volume)
   {
      Print("Volume is less than the minimum");
      return(min_volume);
   }

   
   if(volume>max_volume)
   {
      Print("Volume is greater than the maximum");
      return(max_volume);
   }
}

and normalize it immediately at a return

return(NormalizeDouble(volume,LotDigit(symb)));

You check for min/max and then make calculations, so the calculation can be anything. You should check for min/max after calculations, not before

---------------------------

And here's mine)


Reason: