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

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
Greetings all, I downloaded Owl, in the tester everything is normal and sells and buys, I put it on the demo in Alpari, only buys.....
Maybe something is missing there? I don't know how it would work....
/* decompiled deleted */
I want my Expert Advisor to buy when the price is close to the price of the mask + indenti_thresholdFromMa. I wrote it this way for a long position:
The value offastMa is passed through the function parameters. Then I compare values of the current high and low with the value of thefastMa fast stroke.
If the value of high or low is equal to the value of thefastMa fast valve, then logically an order should be opened at the price (value of thefastMa fast valve + offset from iti_thresholdFromMa).
The function doesn't work. What is the reason? The Expert Advisor does not send any errors to the journal.
I want my Expert Advisor to buy when the price is close to the price of the mask + indenti_thresholdFromMa. I wrote it this way for a long position:
The value offastMa is passed through the function parameters. Then I compare values of the current high and low with the value of thefastMa fast stroke.
If the value of high or low is equal to the value of thefastMa fast valve, then logically an order should be opened at the price (value of thefastMa fast valve + offset from iti_thresholdFromMa).
The function doesn't work. What is the reason? The Expert Advisor does not send any errors to the journal.
Good evening, you are in the middle of the night!
Equals between fractions will never be fixed! The ticks will slip and there will be no signal. That's why it's better this way:
I agree with Boris, but I would also add that any price comparison is better done as follows
not Bid>fastMA but Bid-fastMA>Zero
Not High[0]>=fastMA , but High[0]-fastMA>-Zero , and so on:)
In the global section:
#define Zero 0.00000001 , or something similar.
I agree with Boris, but I would add that any price comparison is better done as follows
not Bid>fastMA but Bid-fastMA>Zero
Not High[0]>=fastMA , but High[0]-fastMA>-Zero , and so on:)
In the global section:
#define Zero 0.00000001 , or something similar.
Alexey and Boris thank you for your valuable comment.
#define Zero 0.00000001 , I think it would be very small :) I suppose you can safely put half a point here or a spread point...
Alexey and Boris thank you for your valuable comment.
#define Zero 0.00000001 , I think it would be very small :) I suppose you can safely put half a point here or a spread point...
Try putting a variable instead of Zero and that's how you define the necessary clearance! And most likely you should leave it, because its value will change depending on the state of the market.
Yes, if there is a variable, we should test it and observe the market results. In the meantime, I am writing it to run it in the tester and identify strengths and weaknesses of my TS.
This is my logic:
I've put 1 in place of the variable clearance for now for the test, and then I'll put it in the external one.
As I understand it will be the most correct variant. If the price touches the bar or not, it will be important to get a signal. The candlestick has two ends (high and low). It means we check by its 2 extremums. That is why I wrote the gap to be shorter than 1.
But I wonder if it opens at the distance ofi_thresholdFromMa(indent), i.e. not from the wrist, but from the candle's extremum.
I will ask you not to pay attention to the condition for entering in the function of opening, of course I will include it in the signal function.
Here is a screenshot, for example,
The red ball is fastMA.i_thresholdFromMa(indent from the waving) is 5 in external variables. All other conditions are buy. Here we see 2 blue stop orders below the red fastMa. I do not see any logic here. The order is sent precisely at the priceND(fastMa + i_thresholdFromMa * pt) and I can see it in the given function...
Yes, if variable, it should be tested and observed in the market, what kind of results it shows. In the meantime, I am writing this to run it in the tester and identify strengths and weaknesses of the TS.
This is my logic:
I've put 1 in place of the variable clearance for now for the test, and then I'll put it in the external one.
As I understand it will be the most correct variant. If the price touches the bar or not, it will be important to get a signal. The candlestick has two ends (high and low). It means we check by its 2 extremums. That is why I wrote the gap to be shorter than 1.
But I wonder if it opens at the distance ofi_thresholdFromMa(indent), i.e. not from the wrist, but from the candle's extremum.
I will ask you not to pay attention to the condition for entering in the function of opening, of course I will include it in the signal function.
Here is a screenshot, for example,
The red check mark is fastMA.i_thresholdFromMa(indent from the waving) is 5 in external variables. By all conditions the rest are buy. Here we see 2 blue stop orders below the red fastMa. I do not see any logic here. The order is sent exactly at the priceND(fastMa + i_thresholdFromMa * pt) and I can see it in the given function...
If you want the position to open earlier, in the middle of a bar, you have to specify Low bar for the Bai and High bar for the Sall.
If you want the position to open earlier, in the middle of a bar, you must specify Low bar for the Bai and High bar for the Sall.
Well, you don't have to do it earlier. I do not know from which side the candle approaches the mask. Top or bottom. That's the question. That's why it's inappropriate. Isn't it?
Anyway, the open price in my function OrderSend() is different and anyway it is higher than the mask:
Here I print the values in the function:
This is what the log shows:
It is obvious, that the opening price should be set by me. You are being calculated. A gap is added to the machine value. And you can see it in the print...