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 isLossLastPos() function.
This function returns the loss flag of the last closed position. Flag up - True - last position was closed with a loss. Flag omitted - False - the last position was closed either at zero, or at a profit. This function doesn't consider swaps and commissions. Selection of positions is defined by external parameters:
In order not to multiply the number of functions related to the last closed position, I suggest the following variant:
This function defines the ticket number of the last closed position...
Further actions with number of the ticket are at programmer's discretion, depending on a problem to be solved...
Function FindNearFractal().
This function searches for the nearest fractal and returns its price level. The function accepts the following optional parameters:
Examples of using FindNearFractal().
SZY. Attached is a script to test the FindNearFractal() function.
Примеры использования функции SetVLine().
ЗЫ. Во вложении скрипт для тестирования функции SetVLine().
Examples of how to use SetVLine().
ZS. Attached is a script to test SetVLine() function.
Hi Igor,
Could you please show me an example of how such a function can be used in an indicator.
I am trying to improve PreviousiHighsvAndhLows0 indicator and add a mark to it by time.
Using SetVLine() example and draw the mark at bar opening with a certain time...
So far, my version has drawn some nonsense.
I've already asked for help on the forum, but beginners aren't spoiled here...
Thank you anyway, your functions are very useful for step-by-step learning, but of course it would be good if there were many more hints or examples
Could you please show me an example of how such a function can be used in an indicator.
I'm trying to improve the indicator and add a time stamp drawing to it.
Using SetVLine() example and draw a mark at bar opening with a certain time...
Show in the illustration which marks you wish to draw.
GetExtremumZZZBar() function.
This function searches for an extremum of the standard custom ZigZag indicator and returns the bar number. The function accepts the following optional parameters:
Examples of using GetExtremumZZZBar() function.
ZS. Attached is a script to test GetExtremumZZZBar() function.
Show in the illustration which marks you wish to draw.
Thank you, Igor, for responding,
It took me two days, but I made the mark.
Now I'm trying to do another one.
I need it for testing
Using your i-AnyRange indicator, I want to make
The indicator will process the time with random deviation.
For example -
the indicator has
time1=10:05;
time2=15:35;
and in the indicator itself for calculations of indicator lines it uses
T1=time1(+/-random)
T2=time2(+/-random)
but we need also to set the max deviation limits, for example
max random =5min;
The conundrum is just how to limit randomness to 5 minutes?
You probably have similar examples
but you need to set the max deviation limits as well, e.g.
max random =5min;
The snag is just how to limit the randomness to 5 minutes?
You must have similar examples.
5 minutes is 300 seconds:
Five minutes is 300 seconds:
Thank you of course, but it doesn't quite answer the questions,
How to add int b to string Time2 minutes now or how to make plus minus random
>> I'll look into it, of course, but I'm having a hard time.