Requests & Ideas (MQL5 only!) - page 10

 
Vladimir Karputov:

Naturally, if there was a gep and the bar opened well below the "SL" level, then "SL" will be executed at the opening price of the bar - that is, there will be more losses.

would it be possible to protect trading using limit orders?
 
ef91:

would it be possible to protect trading using limit orders?


How?

Types of Orders:

order types

 
Vladimir Karputov:


How?

Types of Orders:



https://www.mql5.com/en/articles/1683


I was reading this article this morning, I'm not sure I have enough skills or experience to code a solution. Maybe it can be useful for you that have much more experience and are able to more quickly and efficiently code EAs

How to Secure Your Expert Advisor While Trading on the Moscow Exchange
How to Secure Your Expert Advisor While Trading on the Moscow Exchange
  • 2015.10.09
  • Vasiliy Sokolov
  • www.mql5.com
The article delves into the trading methods ensuring the security of trading operations at the stock and low-liquidity markets through the example of Moscow Exchange's Derivatives Market. It brings practical approach to the trading theory described in the article "Principles of Exchange Pricing through the Example of Moscow Exchange's Derivatives Market".
 
Vladimir Karputov:

If the adviser works at each tic - why to open five positions in a row? Maybe it is worth opening one position which will have a volume * 5?

It can work like what you say also , but as price changes on everytick so I want it to open some positions in the same condition but different prices. Anyway the most important thing is to limmit positions so that we dont get margin call
 

Forum on trading, automated trading systems and testing trading strategies

Requests & Ideas (MQL5 only!)

Fafar.forex, 2017.05.10 13:10

Hi Mr. Vladimir,

I have two idea to make an EA on Bollinger bands with specific parameters and limit the open positions at the same time for this EA, 

It only use Bollinger bands, with parameters period 26, deviation 4.5, and shift 0,
I want it to search for the price which touches upper band and where touches lower band. 
Buy for lower band touch and sell for upper band touch. 

But it should work on every tick and max open positions should be 5 , 

Tnx :)

Fafar.forex:

It can work like what you say also , but as price changes on everytick so I want it to open some positions in the same condition but different prices. Anyway the most important thing is to limmit positions so that we dont get margin call


Good. Tomorrow we will begin ...

 
Fafar.forex:
Hi Mr. Vladimir,

I have two idea to make an EA on Bollinger bands with specific parameters and limit the open positions at the same time for this EA, 

It only use Bollinger bands, with parameters period 26, deviation 4.5, and shift 0,
I want it to search for the price which touches upper band and where touches lower band. 
Buy for lower band touch and sell for upper band touch. 

But it should work on every tick and max open positions should be 5 , 

Tnx :)

And what about the parameters:
  • StopLoss, 
  • TakeProfit 
  • and lot size?

Or will we make StopLoss floating?

Bollinger Bands GBPUSDH1

 
Vladimir Karputov:

And what about the parameters:
  • StopLoss, 
  • TakeProfit 
  • and lot size?

Or will we make StopLoss floating?


Hi , good day to you,
Is this bollinger band in the picture with parameters that I have mentioned ? 
Period : 26
Deviation :4.5

If the stoploss be floating I guess would be better
 
Fafar.forex:
Hi , good day to you,
Is this bollinger band in the picture with parameters that I have mentioned ? 
Period : 26
Deviation :4.5
...


No, in that picture the indicator with standard parameters (period 20, deviation 2.0). 

And here is the indicator with your parameters (period 26, deviation 4.5):

Bollinger Bands EURUSDH1

As you can see, with your parameters (period 26, deviation 4.5) there are no signals to trade

 

Bollinger Bands N positions version 1.000

In this version:

  • Work only on a new bar (not on every tick)
  • Trading signals are executed in the form of graphic objects OBJ_ARROW_BUY and OBJ_ARROW_SELL

This version allows you to visually assess the parameters of the indicator. For standard parameters (period 20, deviation 2.0):

Bollinger Bands standard parameters (period 20, deviation 2.0)

 

Is there a simple function to chek if the market is open right now?

For example:

if(MarketIsOpen(){
 OrderSend(request, result);
}

This is very usefull when we are working with OnTimer() instead of OnTick() events. This also avoids problems in the holydays.

Thanks

Reason: