[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 696
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
Please advise,
In order to calculate the number of continuous events (e.g. the number of bars in a series in which the close is higher than the open and vice versa), I could only come up with the following:
Two questions (if the above makes sense): (1) how to reset the counter reading if the continuous series has stopped; and (2) how to correctly write Buffer[i] - i.e. how can I "see" the result itself?
I.e., if the indicator for a particular bar shows "-3", it means that this is the third bar in a row which closed below the opening; if the next bar after it closes above the opening, the indicator will show "1" ......
In the global variables set the initial value of the lot:
There we assign this value to the variable, which will pass the lot value to the position opening function:
After closing the position we will check it for profitability/loss:The function itself, thanks to Igor Kim...
One more question:
I got the following order for some reason. The next order is equal to the initial lot multiplied by 2, i.e. 1 lost (0.01) 2 lost (0.02) 3 lost (0.02) 4 won (0.02)
and I wanted 1 lost (0.01) 2 lost (0.02) 3 lost (0.04),
And one more thing:
Please advise whether you can do the following (and if you can please write how) :
1 in the code to prescribe the orders and their sizes in turn, so that if the previous order was unprofitable the next one would open, until you get a profit, and then everything from the beginning. Example:
1 Lot 0.01
2 Lot 0.01
3 Lot 0.02
....
15 Lot 1.0
Thank you in advance
Boris.
Give me a hint,
What I would do is this. If I were to catch a series of the last four bars, then
Can someone tell me what my mistake is ( question and code on page 693 )?
Try replacing
if (OrderStopLoss()<pp-(TStop.Buy+TrailingStep-1)*po||OrderStopLoss()==0)
to
if (OrderStopLoss()>pp-(TStop.Buy+TrailingStep-1)*po||OrderStopLoss()==0)
One more question:
I got for some reason that the subsequent order is equal to the initial lot multiplied by 2. i.e. 1 lost (0.01) 2 lost (0.02) 3 lost (0.02) 4 won (0.02)
and I wanted 1 lost (0.01) 2 lost (0.02) 3 lost (0.04),
And one more thing:
Please advise whether you can do the following (and if you can please write how) :
1 in the code to prescribe the orders and their sizes in turn, so that if the previous order was unprofitable the next one would open, until you get a profit, and then everything from the beginning. Example:
1 Lot 0.01
2 Lot 0.01
3 Lot 0.02
....
15 Lot 1.0
Thank you in advance
Boris.
Please tell me if I understand correctly that the anchor angle is the window angle and not the object angle.
And they are counted from left to right, from top to bottom. Then how do I correctly anchor the object to the lower left corner? I have it, the object, disappears from the window for some reason.
Please tell me if I understand correctly that the anchor angle is the window angle and not the object angle.
And they are counted from left to right, from top to bottom. Then how do I correctly anchor the object to the lower left corner? It disappears from the window for some reason.