A lot of coding conventions I have never considered…//-----
20 is not that much different than 22.......
think in terms of the tipping point..... think in terms of total counts......
if the tipping point is 21 you might do something when x >= 22 that you would not if x <= 20 ......
what is your tipping point......
how much must align before you buy...... how much must align before you sell....
look at the mym chart......
saywords().......h
//-----
View attachment 33180
//------
MQL5:if(NewBar()) { Comment("buy " + IntegerToString(b) +" sell " + IntegerToString(s)); if(b >= buyat) {Alert(_Symbol+" buy b " + IntegerToString(b) ); } //---- your buyat would be your buy tipping point if(s >= sellat) {Alert(_Symbol+" sell s " + IntegerToString(s)); } //---- your sellat would be your sell tipping point }
Need to understand the best practices of global variables. I know they were in MQ4. Didn’t understand them but probably my dashboards would freeze.
Code:
if cnt == 90 ....
Interesting. I read that about 4 times before I realized it wasn’t >=…
The first 4 times I figured “MYMM2515alma” would be a global variable for the count since last signal…
But ==. Either you get a single bar to enter, or “MYMM2515alma” exists as a scale up to 10?
MYMM2515alma = 10
MYMM2530alma = 10
MYMM2560alma = 10
MYMM2515hma10= 10
MYMM2530hma10= 10
MYMM2560hma10= 10
MYMM2515hma20= 10
MYMM2530hma20= 10
MYMM2560hma20= 10
That looks like 90 to me… but what is the 10?