-
Get the averages. Look for a cross. Get the Bid
double aPrev = …, aCurr = …, bPrev = …, bCurr = …; bool wasUp = aPrev > bPrev, isUp = aCurr > bCurr, isCross = isUp != wasUp;
-
The iMA functions.
-
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12
{ //Indicator Buffer 4 Break_Top_Line if((High[i] >Buffer2[i]&& High[i+1]<Buffer2[i+1])) ObjectSetText("LastSignalResult","SELL",10,"Arial Black",TopLineColor); ObjectSetText("AtPriceResult",(High[i]+Low[i])/2,10,"Arial Black",TopLineColor); //If the top of the candle rises above the upper channel { Buffer4[i] = High[i]+ Arrow_Distance * myPoint; } if(i == 0 && Time[0] != time_alert) { myAlert("X Indicator", "The current candle has passed the Top Line"); //Instant alert, only once per bar time_alert = Time[0]; } else { Buffer4[i] = EMPTY_VALUE; }William Roeder:
-
Get the averages. Look for a cross. Get the Bid
-
The iMA functions.
-
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12
- That is not a problem; that is reality.
- Why is your posting code looking at bar i? Bid is now. You can only look at bar zero and one to get now.
- The only other approach is to compute your MAs yourself and use a binary search to find what bid would have resulted in a cross. Way beyond what you can do.
- That is not a problem; that is reality.
- Why is your posting code looking at bar i? Bid is now. You can only look at bar zero and one to get now.
- The only other approach is to compute your MAs yourself and use a binary search to find what bid would have resulted in a cross. Way beyond what you can do.
What "price at which they crossed?" The Bid or the cross?
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
What "price at which they crossed?" The Bid or the cross?
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello Goodnight.
I am writing an indicator, and I want to register, and keep it fixed on the screen,
the price that was at the moment the circumstances occurred: in this case, the Bid of the moment in which the averages were crossed.
Can someone guide me? What function I should be used?
Thank you very much in advance. I'm looking for a while, and I can't find this question in the forum or anything that inspires me how to do it.