Issue placing 1 trade per bar New comment Connor Fitz 2015.09.17 03:54 Hello, this is my first post on this forum.I have been having an issue with getting only 1 trade per bar happening, i searched the forums and used similar code to what others suggested but it still places many bars on certain spots. Can anyone explain why this is occurring and how to fix it?My code: if(lastBar < Bars){ canTrade = true; lastBar = Bars; }What happens Issue when placing trades Need simple help to fix my EA, how to prevent re-entry on same bar? 1 trade per day Keith Watford 2015.09.17 04:13 #1 It is generally accepted that Time[0] is better to detect new bars. Do you set cantrade to false anywhere in your code?Do you check cantrade before opening trades? Connor Fitz 2015.09.17 04:16 #2 canTrade is checked before trades are placed and it is changed to false after a trade, ill modify my code to see if Time[0] will have a better effect Connor Fitz 2015.09.17 04:18 #3 i believe i found the problem. Thanks for your help! New comment
Hello, this is my first post on this forum.
I have been having an issue with getting only 1 trade per bar happening, i searched the forums and used similar code to what others suggested but it still places many bars on certain spots. Can anyone explain why this is occurring and how to fix it?
My code:
What happens