[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 394
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
Good evening!!! I have decided to write how to calculate the distance from the price to the nearest order above, and the nearest below. I count up to each order, going through the loop forwards and out of all this I choose the minimum number. Well, this turns out to be such a load of crap! Well, okay, the distance turns out sometimes great, 1162 points or more, I'm almost 100 percent sure well no way, well, okay! But if you divide 1162 by 40, that's four...
And it does come out, look at the log screenshot, there are exactly M equals 4, there in the line after the X+++ ...... I don't get it. Either I'm a moron or I don't understand the normalize double function... I don't get it! Or what? ...... Please tell me, I'm totally confused and am amazed !!!!
Can you please help me write code to execute the program only when a new bar arrives and ignore the inter-bar ticks? I don't know what's going on.
Can you please help me write code to execute the program only when a new bar arrives and ignore the inter-bar ticks? Thank you.
Declare an integer variable before the initialization block. For example, int MyBars;
Then in the initialisation block, assign this variable a value = zero. In the start function write:
Now tell me, what happens on the next tick? What will end up in the MyBars variable?Vladimir, I daresay nothing will happen. The MyBars variable will still contain Bars :(
Please help, how can I write code to execute the program only when a new bar arrives and ignore the inter-bar ticks? Thank you.
or so -
Declare an integer variable before the initialisation block. For example, int g_time.
In the start function write:
or so -
Declare an integer variable before the initialisation block. For example, int g_time
In the start function write:
You shouldn't be writing here. I would have deleted your post.
You shouldn't be writing here. I would have deleted your post.
I don't understand. Why not?
Try to use the SRC (there's a button at the top of the text box) to insert your codes. It will be easier to read your posts.
I've noticed your search for shadows (top_ten=High-Close;). Why do you subtract Close and not Open? Think about it.
A white candlestick is closed by close, therefore the upper shadow will be considered as such; if it is open then it will be the upper shadow + the candlestick body
Upper shadow (High-MathMax(Open. Close))
Low shadow (MathMin(Open, Close)-Low)