NexusFi: Find Your Edge


Home Menu

 





Issuing Trade Entry Orders at Defined Spread Limits


Discussion in EasyLanguage Programming

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




 
Search this Thread

Issuing Trade Entry Orders at Defined Spread Limits

  #1 (permalink)
 Hemmo 
Newcastle, NSW, Australia
 
Experience: Intermediate
Platform: MC, TS, SQX, Build Alpha
Broker: IB, TS, OANDA
Trading: CFDs, Futures
Posts: 34 since Sep 2017
Thanks Given: 64
Thanks Received: 38

I have started using MultiCharts 11 (not the .net C# version), looking to automate some of my existing intraday trading strategies for spot forex CFDs. OANDA is the CFD broker.

The plan is to allow the automated trading systems to be running 24 hours per day. However, one of the issues to overcome is the period of 'zombie' hours between approximately the closing of the US session and the opening of the Asian session. During this time, the spreads on the CFDs blow out due to the very low liquidity levels. For example, where the GBPUSD spread may typically be 0.6 pips during liquid periods, it can blow out to say 3 or 4 pips during the illiquid periods, which is very expensive and simply not viable for some intraday trading systems. Therefore, I don't wish to enter a trade at that spread. Note, this is a 'spread-only' account, therefore there is no commission on trade entry or exit.

Unfortunately, it is not simply a case of coding the strategies to operate within defined times of the day. Sometimes the liquidity comes on early, and at other times you are sitting at the screens thinking, "come on guys, where is everyone?". And of course, news announcements or other events can temporarily blow out the spreads as well.

Therefore, I would like to have the MultiCharts PowerLanguage coded in a way so as to disallow any trade entries during these high spreads. The OANDA plugin with MultiCharts does not advise MultiCharts what the spread is at any given time. It would have to be along the lines of MultiCharts sending the trade entry order to OANDA but when the broker receives it, if the spread is greater than say 1.8 pips, then the order is not executed by the broker.

Does such a function exist?

Can anyone share the code which will achieve this?

Also, within the MultiCharts Signal, where should the code be placed?

Your input would be appreciated. Thank you.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
32 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,435 since Apr 2013
Thanks Given: 482
Thanks Received: 1,628


Hemmo,

once Multicharts issues the order, you can only cancel it again (unless it's filled of course), I am not aware of an additional feature within MC that would allow the order to be only filled at your broker when the spread is less than X.

In realtime you can check the spread before you issue the order and try to cancel placed orders when the spread is greater than X. Take a look at the build in Bid & Ask indicator to see if it correctly displays the bid and ask prices of your broker.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 Hemmo 
Newcastle, NSW, Australia
 
Experience: Intermediate
Platform: MC, TS, SQX, Build Alpha
Broker: IB, TS, OANDA
Trading: CFDs, Futures
Posts: 34 since Sep 2017
Thanks Given: 64
Thanks Received: 38

Thank you for posting, ABCTG.

OANDA has a plugin for integrated Chart Trading on each chart screen of MultiCharts. Can anything be automated at this level?
For example, if buying: bid price minus the ask price = x pips. Then x must be less than 2.0 pips for the trade entry order to be issued to OANDA.

Started this thread Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,435 since Apr 2013
Thanks Given: 482
Thanks Received: 1,628

Hemmo,

the Chart Trader is for manual trading only and you can't access it with code.

However as I wrote in my previous code, you can check the bid ask spread from the code level and only issue the order when the spread matches your criteria.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on May 31, 2018


© 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