NexusFi: Find Your Edge


Home Menu

 





No orders issued using Buy Stop


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,632 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

No orders issued using Buy Stop

(login for full post details)
  #1 (permalink)
 arjfca 
Montreal, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: Interactive Broker
Trading: Forex
Posts: 263 since Sep 2010
Thanks Given: 440
Thanks Received: 91

Hello

I'm writing my first signal in Multicharts Easylanguage. All parameters to enter in the loop are ok and are reflected in the print command
I'm suspecting the stop command.

I trully accept the fact that it is difficult to debug only a portion of the code, but who knows if I make a big apparent mistake.

Any help appreciated

Martin

Here is a portion of my code.

IntraBarGeneration = True
 
Code
                            
 
If MyPosition 0 then begin // No position in the market
    
If Havelong true then begin
        
Print( "Long "QTYspaces(1), PricetargetL:0:5);
        
Buy ("Long 1"next bar QTY contracts at PriceTargetL stop;
        
Setstoploss (Par QtyBigPointValue);
     
end;
 
 
   If 
HaveShort true then begin
      Sell 
("Short 1"next bar QTY contracts at PriceTargetS Stop;
      
SetStopLoss (Par QTYBigPointValue);
   
end;
end//MyPosition = 0 then begin 
 
Some value from the print command.  I would had no value if   HaveLong False 
MyPosition = 0
Print("Long ",QTY,spaces(1),PricetargetL:0:5);

 
Code
Long 125000.00 1.34520
Long 100000.00 1.34510
Long 95000.00 1.34540
Long 90000.00 1.34510
Long 86000.00 1.34560

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
30 thanks
Supertradersams Thread Journal on NQ/MNQ
25 thanks
Deaddogs Stock Trading
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
Daytrading ES & NQ
13 thanks

(login for full post details)
  #3 (permalink)
Jeff65
Gurnee, IL
 
Posts: 46 since Apr 2010
Thanks Given: 17
Thanks Received: 97


Just looking at the code it seems yor stop order are not being placed on each bar. You have your stop order within the block defined by a flat position: market position = 0

When you enter a trade, market position is not zero, thus yor stop is not placed except for the bar when your order is entered.

Reply With Quote
The following 2 users say Thank You to Jeff65 for this post:
(login for full post details)
  #4 (permalink)
 arjfca 
Montreal, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: Interactive Broker
Trading: Forex
Posts: 263 since Sep 2010
Thanks Given: 440
Thanks Received: 91

Hello Jeff

Yes, that could be a real problem. I will work arround and post result later.

Martin

Started this thread Reply With Quote





Last Updated on December 14, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts