[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 152

 
gince >> :

>> Thank you


Can't close orders with Kim's functions

 

To check if the signals are given by the functions

(CheckForClose_Buy()) and CheckForClose_Sell()

use the function Comment();

This can be done as follows:

At the very beginning of the int start() function, add two lines:

int start()
{

Comment("CheckForClose_Buy() =",CheckForClose_Buy(),"\n",
"CheckForClose_Sell() =",CheckForClose_Sell() ); 
  //----
  //Print (ExpertName);

 
rid >> :

This function requires some of I.Kim's other functions to be present in the code when it works.

However, if your code compiles without errors, these other functions must be present.

Consequently, the function works fine.

We can only assume that you have incorrectly set conditions for this function to work.

I.e. these functions

(CheckForClose_Buy()) and CheckForClose_Sell()

do not give a command to close positions!

Their values always equal zero.

Check if they work.


Help me find the error Please

 

there are signals on the visual

Like

 

Added my message above.

Check, in the top left corner of the chart. Are these functions giving signals. Or do they remain zero all the time.

 
rid >> :

To check if the signals are given by the functions

(CheckForClose_Buy()) and CheckForClose_Sell()

use the function Comment();

You can do it this way:

Put int start() at the beginning of the function:

Yes I see Always 0

We need to look for

>> thank you for

Comment("CheckForClose_Buy() =",CheckForClose_Buy(),"\n,
"CheckForClose_Sell() =",CheckForClose_Sell() );

 

Try setting other conditions for closing positions. Instead of these functions.

I have delved into closing here in my time :

'Closing positions. On indicator signal.

 

Stop. Perhaps the error is this.

When you open positions, you do NOT specify MAGIC in your code !!!!!!!!!!!!!!!!!!.

But in the closing conditions you provide a check for MAGIC.

And of course, the functions do not give a signal to close!

Because they do not see open positions with a specified MAGIC.

 
As you know, the bars on the charts are drawn according to the principle
"An undefined number of ticks in a bar in a strictly defined time period".
Are there any indicators, scripts or converters implementing the opposite principle
"An undefined amount of time in a strictly defined amount of ticks"?
If you know, please send me the link.
 
Oper писал(а) >>
As you know, the bars on the charts are drawn according to the principle
"an indeterminate number of ticks in a bar over a strictly defined period of time".
Are there any indicators, scripts or converters that implement the opposite principle?
"An undefined amount of time in a strictly defined amount of ticks"?
If you know, please send me the link.

CodeBase has equiVolume indicators. There is an article on this subject by Composter.