[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 66

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
Below is the code itself.
If you have a simpler solution, I would be glad to receive comments.
This is probably better.
Thanks, but it's a bit complicated for me, and your function outputs 4 messages at once, while I need one. It turns out no more than 64 characters in one line?
No. You take your long message and divide it into as many parts as you can read on the screen, but no more than four. The main thing is that each part should not exceed 64 characters. If your message is short, you can pass it to a function in one part.
Look, I've attached a tipster in the trailer to test this function. Run it in the tester in visual mode and put Win_Inform indicator on the visualization chart (it is in my previous message in the trailer). You will immediately see how this function works.
That's probably better.
This is about the code I used to start upgrading mine. There are 3 problems in your version:
- as soon as OP_BUY and OP_SELL orders are opened, the OrdB and OrdS parameters will automatically increase on every tick, so I added the recalculation condition only on the change of the corresponding tick (sell or buy);
- the recalculation of all orders leads to the error OrdB and Ord, we need only the last change in orders to be considered;
- in your version there is no decrease of parameters OrdB and Ord for further opening of orders if (OrdB<=OrederBuy),if(OrdS<=OrederSell).
That seems to be the case.
This is about the code I used to start upgrading mine. There are 3 problems in your version:
- as soon as OP_BUY and OP_SELL orders are opened, the OrdB and OrdS parameters will automatically increase on each tick, so I added the recalculation condition only on the change of the corresponding tick (sell or buy);
- the recalculation of all orders leads to the error OrdB and Ord, we need only the last change in orders to be considered;
- in your version there is no decrease of parameters OrdB and Ord for further opening of orders if (OrdB<=OrederBuy),if(OrdS<=OrederSell).
It seems to be the same.
Right, we need to zeroize the counters of orders before the for loop
Good afternoon! Please help me understand the function from Kim:
I don't understand the line
Why there are no signs after the first if, what happens when an expression is written like this. What does StringFind do, and why is the string searched by JPY? How can d = 0, and in which case 2 is assigned and in which 4? I will be very grateful for the answer, thanks in advance)))
That's right, before the for loop, you have to reset the order counters to zero
)) For some reason I didn't think of that myself, started to get winded.
Good riddance.
I think this makes more sense
d - quotation accuracy (digits after the decimal point)
if there is a JPY pair, then the rate for the majors is xxx.xx
if there is no JPY in the pair, then the rate for the majors will be x.xxxx (hence the name "four digits")
Yes right, before the for loop, we need to reset the order counters to zero
I have missed another point:
- in your version, there is no decrease of parameters OrdB and OrdS for further opening of ordersif (OrdB<=OrederBuy),if (OrdS<=OrederSell).
In the new version, we have, for example, opened 5 orders, recalculated them, but the if condition won't let us open any more orders. In my old variant, OrdB-- and OrdS--
were used.
I think this makes more sense
d - quotation accuracy (digits after the decimal point)
if there is a JPY pair, then the rate for the majors is xxx.xx
if there is no JPY in the pair, then the rates for the majors are approximately x.xxxx (hence the name "four digits")