I need help with comments please - page 2

 

Place Print("this Position is ....

after your ordersend(....)

 

This might work. It compiles, looks ok, I didn't run it.

Small change to your print statements location.

The code does not prohibit multiple signals, so there may be more than one true at the same time.

 

void CheckForOpen() {
   int    res,tr;
    
    //---- sell conditions
   co=CalculateCurrentOrders(Symbol());
   if(sellsig && lastsig!=-1)  {
      co=CalculateCurrentOrders(Symbol());
       if (co==0) {
            if ( Short == true)Print(" Short signal taken ");
            if ( Short2 == true)Print(" Short2 signal taken ");
            if ( Short3 == true)Print(" Short3 signal taken ");
            if ( Short4 == true)Print(" Short4 signal taken ");
            res = OpenStop(OP_SELLSTOP,LotsRisk(StopLoss), Low[shift]-OrderPipsDiff*Point, StopLoss, TakeProfit1);
       }
       lastsig=-1;
       last=Time[0];
      return;
   }
    //---- buy conditions
   co=CalculateCurrentOrders(Symbol());
   if(buysig && lastsig!=1)  {
      co=CalculateCurrentOrders(Symbol());
       if (co==0) {
            if ( Long == true) Print(" Long signal taken ");
            if ( Long2 == true)Print(" Long2 signal taken ");
            if ( Long3 == true) Print(" Long3 signal taken ");
            if ( Long4 == true)Print(" Long4 signal taken ");
            res = OpenStop(OP_BUYSTOP,LotsRisk(StopLoss), High[shift]+OrderPipsDiff*Point, StopLoss, TakeProfit1);
       }
       last=Time[0];
       lastsig=1;
      return;
   }
}
Files:
 
Gidday

I have tried both ways but still end up with a list
 

Then "think about something else" as my Dad used to say.

Go fishing.

Eat a peach.

 
great minds think a like. It will come together when I'm not thinking about it.


Cheers
 

Did you run the attched file? It has my changes...

 
phy:

Did you run the attched file? It has my changes...

Yes and I was hoping it would do it but no it did the list thing again. There must be away of doing this. i will look at it after christmas


Cheers

Have a great Christmas.
 

Here you go, try again...

Files:
 
Gidday phy

I think you have done it I will have a look,

I have been missing out the "_" in the ordersend line.

Cheers
Reason: