You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The function itself:
ZS. In the trailer is a script for testing the Correlation() function.
GetIndexLastPos() function.
This function returns the index of the last open position or -1. A more accurate selection of positions to be checked is defined by external parameters:
- sy - Name of market instrument. If we set this parameter, the function will consider only positions of the specified instrument. The default value "" means any market instrument. NULL means the current instrument.
- op - Trade operation, position type. Valid values: OP_BUY, OP_SELL or -1. The default value -1 means any position.
- mn - Position identifier, MagicNumber. Default value -1 means any identifier.
ZS. Attached is a script to test GetIndexLastPos() function.The GetLotLastPos() function.
This function returns the lot size of the last open position or -1. A more accurate selection of positions to be checked is defined by external parameters:
- sy - Name of market instrument. If you set this parameter, the function will consider only positions of the specified instrument. The default value "" means any market instrument. NULL means the current instrument.
- op - Trade operation, position type. Valid values: OP_BUY, OP_SELL or -1. Default value -1 means any position.
- mn - Position identifier, MagicNumber. Default value -1 means any identifier.
ZS. Attached is a script to test GetLotLastPos() function.GetIndexLastPos() function.
This function returns the index of the last position opened or -1. A more accurate selection of positions to be checked is specified by external parameters:
ZS. Attached is a script to test GetIndexLastPos() function.What is the index ? Is it a bar number of the last position opened? Or something else?
What is the index? Is it the bar number of the last open position? Or something else?
This is the sequence number of the position in the list of open positions and set orders. The numbering starts from zero and is the same for positions and orders.
Dear Igor, please help me. The problem is that I cannot find anywhere the code how to attach MA to CCI or Stoch. The buy or sell signal should be generated when this МА crosses the CCI level, e.g. +100/-100.
Maybe there is an Expert Advisor that uses the code I need?
GetMaxLotFromOpenPos() function.
This function returns the maximum lot size from the number of open positions. A more accurate selection of positions to be checked is specified by external parameters:
- sy - Name of market instrument. If this parameter is set, the function will consider only positions of the specified symbol. The default value "" means any market instrument. NULL means the current instrument.
- op - Trade operation, position type. Valid values: OP_BUY, OP_SELL or -1. The default value -1 means any position.
- mn - Position identifier, MagicNumber. Default value -1 means any identifier.
ZS. In the trailer there is a script to test GetMaxLotFromOpenPos() function.GetMinLotFromOpenPos() function.
This function returns the minimum lot size from the number of open positions. A more accurate selection of positions to be checked is specified by external parameters:
- sy - Name of market instrument. If this parameter is set, the function will consider only positions of the specified symbol. The default value "" means any market instrument. NULL means the current instrument.
- op - Trade operation, position type. Valid values: OP_BUY, OP_SELL or -1. The default value -1 means any position.
- mn - Position identifier, MagicNumber. Default value -1 means any identifier.
HH. Attached is a script to test GetMinLotFromOpenPos() function.Dear Igor, please help me. The problem is that I cannot find anywhere the code how to attach MA to CCI or Stoch. The buy or sell signal should be generated when this МА crosses the CCI level, e.g. +100/-100.
Perhaps there is an Expert Advisor that uses the code I need?
This question is obviously not relevant. I will give you an example of such a code fragment using stochastic and MA examples in order not to distract Igor.
MA. I will keep the post for 24 hours - then I will delete it!
MA. I will keep this post for 24 hours - then I will delete it!