No orders issued using Buy Stop - futures io
futures io futures trading



No orders issued using Buy Stop


Discussion in EasyLanguage Programming

Updated by arjfca
    1. trending_up 2,620 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 3 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

No orders issued using Buy Stop

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

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

Reply With Quote

Can you help answer these questions
from other members on futures io?
With 1 click place orders on two accounts (rithmic and cqg)
NinjaTrader
Scan by comparing SMAs within 5 mins
ThinkOrSwim
Volume Chart Trend Lines
TradeStation
TOS script help - crossover with alerts - help please?
ThinkOrSwim
Where can I download historical tick data for HSI?
Traders Hideout
 
 
(login for full post details)
  #3 (permalink)
Gurnee, IL
 
 
Posts: 46 since Apr 2010
Thanks: 17 given, 95 received


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)
Montreal, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: Interactive Broker
Trading: Forex
 
Posts: 263 since Sep 2010
Thanks: 440 given, 91 received

Hello Jeff

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

Martin

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > No orders issued using Buy Stop


December 14, 2010


Upcoming Webinars and Events
 

Every journal equals ten meals for the hungry

Now
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts