NexusFi: Find Your Edge


Home Menu

 





No orders issued using Buy Stop


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,643 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

  #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?
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #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
Thanked by:
  #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