Please EA Programmers can u please tell what is wrong with the code. it compile without error but it won't place an order in the strategy tester. Anyone with a tip or clue on how to resolve it?
From the posted code.... I have no idea, however this is how I would approach the peoblem:
first, check the trade logic, by forcing one to be true;
ie comment out the trade if statement and replace it with if(true){ for the purposes of testing the trade placement code.
if((bar[3].open < bar[3].close && bar[2].close < bar[3].open && bar[1].close < bar[2].close) && glSellPlaced == false && (openPosition == false || positionType != POSITION_TYPE_SELL)) {
would become
if(can_sell()){
bool can_sell(void){ if((bar[3].open < bar[3].close && bar[2].close < bar[3].open && bar[1].close < bar[2].close) && glSellPlaced == false && (openPosition == false || positionType != POSITION_TYPE_SELL)) return(true); return(false); }
you will find this a lot easier if your entry logic is done in separate functions that return a bool. then your code looks something like this for the purposes of debugging
if(true) enter_sell();
where enter_sell() is another function that handles the sell code. and testing true just assumes that the entry logic says "yes" so we can see the order code in action.
then you will know which part of the code is failing.
Please EA Programmers can u please tell what is wrong with the code. it compile without error but it won't place an order in the strategy tester. Anyone with a tip or clue on how to resolve it?
Do not double/triple post!
It is selfish, narcissistic and wastes people's valuable time!
I have deleted your other 2 topics.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Please EA Programmers can u please tell what is wrong with the code. it compile without error but it won't place an order in the strategy tester. Anyone with a tip or clue on how to resolve it?