Useful features from KimIV - page 72

 
Or should the function itself be prescribed elsewhere in the EA?
 
kurilko >> :
Or should the function itself be prescribed elsewhere in the EA???

I did it... NumberOfBarOpenLastPos returns number of bar of last opened and existing pose...

Add NumberOfBarCloseLastPos and you're good to go)

Here you go...

There are a lot of topics about this theme!

Files:
xofbar.mq4  12 kb
 
WroC >> :

Turned it on... NumberOfBarOpenLastPos returns the bar number of the last opened and existing pose...

Add NumberOfBarCloseLastPos and you're good to go)

Here you go...

There are a lot of topics about this theme... go to search!

Thank you very much all worked out....

 

Hello Igor!

Do you have a script that modifies all open positions by volume (lots) for all instruments by a certain percentage? Both upwards and downwards, while maintaining the Magic Number for each position?

 

Igor, hello.

I am looking for function to calculate lot size input parameter is only risk, say 74.2%.

I need it to return the lot size. For currencies it is clear, it exists. But I want it to be universal, apart from currencies it would also work with CFD on futures http://www.procapital.ru/showthread.php?t=7575&highlight=%D0%BC%D0%B0%D1%80%D0%B6%D0%B0.

I have tried GCJ9 (Vroko), it is very interesting tool. I have only problems with lot calculation. Maybe you already did it for someone. I searched the forum and there is no such function.

 
LeoV писал(а) >>

Hello Igor!

Do you have a script that modifies all open positions by volume (lots) for all instruments by a certain percentage? Both upwards and downwards with saving Magic Number for each position?

it will not work with Magic Numbers...

 
xrust писал(а) >>

It's clearly not going to work with keeping the mezzanine...

Can't it be done with mejic retained?

 
LeoV >> :

Can't it be done with the honeycomb intact?

You can, why not?

It would still be a reopening (closing and opening) of a position. It's enough to save the mag before closing and open with the same one.

 
Sorry, my mistake, in my half-asleep state I somehow thought it was a ticket...
 
KimIV >> :

The ExistOrders() function.

Returns a flag for the existence of an order. Answers the question if the order is set or not. You can use this function to request any order, as well as more specific ones. The request filter is configured using the parameters of the function:

  • sy - Imposes a restriction on the name of the instrument. The default parameter is "" - no restriction, i.e. any instrument. If you pass NULL, the order selection will be limited by the current symbol.
  • op - places a restriction on the order type. No constraint by default, i.e. any order type is checked. Valid values of the parameter are -1, OP_BUYLIMIT, OP_BUYSTOP, OP_SELLLIMIT and OP_SELLSTOP.
  • mn - places a limit on the identification ("magic") number of the order. No constraint by default, i.e. the order with any magic number is checked.
  • ot - places a limit on the order setting time. It is checked to make sure that the order was set later than the value of this parameter. By default, there are no limitations, i.e., the presence of an order with any setting time is checked.

If you can explain how to use your function

To determine availability and volume of an open position as well as availability and volume of pending orders set


Reason: