Forum

Immediate exit from a trade

Does anyone know if there is an easy way to close a position at the market price

A simple question on realtime versus strategy testing

Just trying to get an answer as to why this code seems to work differently when run in the two different modes. What should happen here is an alert should occur the first time a price arrives on a new day. This is what happens when run attached to a chart. However, when run in test mode a new day

Strategy Test versus Real Time behavior

I am new to this system but not to programming. I am somewhat mystified by the behavior of the strategy tester with regard to the simple code snippet – which is simply trying to test for a new day beginning. The code is: datetime Yesterday; int LastDay = 0; bool started = false;