Forums ProRealTime English forum ProOrder support Strange if condition code error Reply To: Strange if condition code error

#74198

it would be good if it was possible to set some varaible that if a buy condition is met, no more statements should be read until the next candle (then you put anything you want to be done in each statement)

There is no reason why you cannot do this except for the fact that it is totally unnecessary as just putting the IF THEN statements in the right order provides the neatest solution to achieving what you require.

I provided three solutions for you, one to your first request which you then changed to something different and then a stop gap solution and then very soon after the correct code to do what you wanted. I didn’t need to provide you with anything but I am a helpful sort of chap who enjoys a challenge. The thread should have been retired at that point with a simple ‘thank you’ rather than you continuing on about it being a PRT problem or bug.

BUY’s and SELL’s and SELLSHORT’s and EXITSHORTS will all be done at the close of a candle and after the code has been read from top to bottom and never before. I have never seen anyone else complain about this little bit of logic that takes seconds to understand before you did. You see it once and then you write your code accordingly. I cannot imagine PRT will be interested in changing it when everyone coding with PRT is perfectly able to grasp and work with this simple logic. Plus if they changed it then all previously written codes would no longer work correctly.

p.s. you did read my code with the capital letters in it otherwise you would not have finally understood where you were going wrong.  🙂

Oh and threads are never retired – they live on forever…… oh and thanks for wishing me a nice day. I did have a nice day, I went for a swim and cleaned the bottom of the boat while I was in the crystal clear water and then I went for a sail round the island of Meganissi and I finished the day off with a curry and a nice glass of red wine or two.  A jolly nice day it was. 🙂