Forum

Abstracting away the OrderSelect for loop

This is just some brain storming, I'm hoping for the community to chime in. I feel like I've soon written this code a 1000 times in different formats, mostly with nested if statements. int Total = OrdersTotal ()- 1 ; for ( int i = Total; i >= 0 ; i--) { if(OrderSelect(i, SELECT_BY_POS)) {

How do I make an EA to trade exactly the same on "open bars" and "Every real tick" settings on history?

How do I make an EA to trade exactly the same on "open bars" and "Every real tick" settings on history? I did create a function that only allows the EA to trade on the first tick if (iVolume(Symbol(),PERIOD_M15,0 )!= 1)return; But I get a diffrent equity graph than when setting the settings to

How did the Expert Advisors you are running perform during the USD job news today(Friday)?

Excellent, more profit than normal! Very good, didn´t even notice it! Good, only minor losses. Some losses but not too bad, it will recover in a few days. Quite bad, big chunk down the toilet. Devastating, the account is no more

Problems with division

Hallo forum!: First post Until now I ´ve solved all problems on my own, by googeling. But this as puzzled me for months. I´ve either figuerd ways around it or ignored it. It´s only in some functions it shows up... if(AboveCounter>BelowCounter&&AboveCounter>0&& BelowCounter>0)