OrderSelect()...tester's ticket# ?

 

Note: This topic's old subject title was: MessageBox() Strategy tester's output ???
Perhaps for clarity reasons, I changed the title.
For latest question, see entry below with the highlighted question.

Let's say I was using Strategy tester.

And let's say I was using my EA code:

   int ticket;
   double price;
   bool wannaBuy = true;
 
   if(wannaBuy){
      price = MarketInfo("USDCHFm", MODE_ASK);
      ticket = OrderSend("USDCHFm", OP_BUY, 1, price, 5, price-0.15, price+0.15, NULL, 0, 0, Green);
   }
 
   // Output
   //Alert(price);
   //Print(price);
   MessageBox(""+price,NULL);

The above code works, but it outputs 2 different prices:

One price for the terminal. The other price for the Tester.

Here is my question.

How can I output the same price to the tester and terminal?

Another words, I want to MessageBox() the tester's price, NOT the terminal's price.

P.S.

Here's a misc. sample pic of my Tester:

 

not sure about this ... but

try to use every tick testing model, make sure 1 Minute history contains the period you are testing

 
old_man:

not sure about this ... but

try to use every tick testing model, make sure 1 Minute history contains the period you are testing


Thanks, but I'm not sure about that either.

Perhaps there's something code-wise I could change.

I just want to be able to (output) MessageBox() the price resulted from the strategy tester. But how?

 

Here's my question in another form.

See this image:

Note ticket #1 (of the tester).

Now, the following code would select ticket number 46900677.

if(OrderSelect(46900677, SELECT_BY_TICKET)==true){
   // ...
}

How can I select ticket number 1?

How can I make this code work?

if(OrderSelect(1, SELECT_BY_TICKET)==true){
// ...
}

 
r2b2lynn:

Here's my question in another form.

See this image:

Note ticket #1 (of the tester).

Now, the following code would select ticket number 46900677.

if(OrderSelect(46900677, SELECT_BY_TICKET)==true){
   // ...
}

How can I select ticket number 1?

How can I make this code work?

if(OrderSelect(1, SELECT_BY_TICKET)==true){
// ...
}


didnt try this but it may solve your problem

Use an incrementing magic number that starts from 1 and each time you open an order you increment this magic number and set it to the order

now select the order the way you want and search for the order that match a given number

in other way you give a new ticket numbering system to your expert.

should work i think

regards

 
code-wise, how would you do that?
Reason: