AutotTrade Help

 

HELLO, I AM NOT A PROGRAMER...

I WANT TO DO THE FOLLOWING: I NEED A CODE THAT EXECUTES ORDER AT A SPECIFIC LEVEL BULL PRICE AND BEAR PRICE WHICHEVER IS REACHED FIRST. I KNOW I CAN DO THAT ON THE PLATFORM, BUT BESIDES THAT I NEED THE CODE TO ONLY EXECUTE ONE ORDER; WHAT I MEAN IS THAT IF THE SPECIFIC LEVEL IS REACHED, AND BECAUSE OF WHIPSAWS IS REACHED SEVERAL TIMES, I ONLY WANT THAT EXECUTES THE FIRST TIME IS REACHED AND ONCE REACHED PUT A TRAILING STOP OF 15 PIPS; WHEN THE TARGET IS REACHED, NOW I DO NOT HAVE OPEN POSITIONS, THEN THE CODE WORKS AGAIN;

I DONT WANT THE SOFTWARE TO EXECUTED ORDER EVERYTIME THAT REACHES THE PRICE LEVEL, I WANT IT TO DO IT ONLY ONE TIME UNTIL I CLOSE THE POSITION AND THEN START AGAIN.

PLEASE IF SOMEONE KNOWS ABOUT THIS CODE OR CAN HELP ME WITH IT, LET ME KNOW,

PLEASE ATTACHED PICTURE


THANKS

ROBERTO

 

Why don't you just enter a BUY STOP or SELL STOP ?

 
phy:

Why don't you just enter a BUY STOP or SELL STOP ?


thanks,, yes but once stop loss or limit is reached,, i want the platform to reexecute the order if again reached the same desired price level, but i wont be on the pc to do it my self,, who places the next order??

thanks

roberto

 

Roberto,

It seems like you only want to have one trade open at a time. You could check the number of trades open as below:


int total = OrdersTotal(); 
   for (i = 0; i < total; i++)
   
   {
   
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
                                                     
               if (total==0)
 
//  Then check for your entry signal here
Hope this gives you an idea and many pips to you!
 
MarketForce:

Roberto,

It seems like you only want to have one trade open at a time. You could check the number of trades open as below:


int total = OrdersTotal(); 
   for (i = 0; i < total; i++)
   
   {
   
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
                                                     
               if (total==0)
 
//  Then check for your entry signal here
Hope this gives you an idea and many pips to you!


THANKS MARKET FORCE,, I REALLY APRECIATE THAT;

DO YOU HAVE MSN OR PHONE NUMBER SO WE CAN TALK, I HAVE AN IDEA THAT CAN WORK FOR YOU,, LET ME KNOW,,

rivelinog@hotmail.com

thanks

Reason: