Buy / Sell Code Problem - MetaTrader | futures io social day trading
futures io futures trading


Buy / Sell Code Problem
Updated: Views / Replies:963 / 3
Created: by resirca52009 Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

Buy / Sell Code Problem

  #1 (permalink)
Elite Member
Indianapolis, Indiana/ USA
 
Futures Experience: Advanced
Platform: MT4, Ninjatrader
Broker/Data: AMP / CQG
Favorite Futures: Futures
 
Posts: 45 since Oct 2012
Thanks: 110 given, 13 received

Buy / Sell Code Problem

Hello,

I have learned a great deal from this site over the past few weeks but unfortunately still feel dwarfed by the amount of knowledge I find here. Not only feel embarrassed to answer a question but more so to ask one. Any way here it is :

Below is my buy / sell code ( based on John Ehlers Center of Gravity Indicator ) Something is just not right; it buys and sells OK but I can't test it in the strategy tester...all results come back insignificant. Any help is much appreciated.

//************GO LONG

if ( (iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 1, 1) > iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 2, 1) && iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 1, 3) > iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 0, 3)) )
{ Print("Trading condition [(iCustom(Symbol(), 0, Center Of Gravity Oscillator...] is valid. Trying to open long position...");
Buy(Symbol(), 0.01, 30, 15, 15); }

//************EXIT LONG

if ( (iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 1, 1) < iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 2, 1) && iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 1, 3) < iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 0, 3)) )
{ Print("Trading condition [(iCustom(Symbol(), 0, Center Of Gravity Oscillator...] is valid. Trying to close long position...");
CloseLong(Symbol()); }

//************GO SHORT

if ( (iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 1, 1) < iCustom(Symbol(), 1, "Center Of Gravity Oscillator",8,true, 2, 1) && iCustom(Symbol(), 1, "Center Of Gravity Oscillator",8,true, 0, 3) < iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 0, 3)) )
{ Print("Trading condition [(iCustom(Symbol(), 0, Center Of Gravity Oscillator...] is valid. Trying to open long position...");
Sell(Symbol(), 0.01, 30, 15, 15); }

//************EXIT SHORT

if ( (iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 1, 1) > iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 2, 1) && iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 0, 3) > iCustom(Symbol(), 0, "Center Of Gravity Oscillator",8,true, 0, 3)) )
{ Print("Trading condition [(iCustom(Symbol(), 0, Center Of Gravity Oscillator...] is valid. Trying to close short position...");
CloseShort(Symbol()); }

Reply With Quote
 
  #2 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


resirca52009 View Post
Hello,


Below is my buy / sell code ( based on John Ehlers Center of Gravity Indicator ) Something is just not right; it buys and sells OK but I can't test it in the strategy tester...all results come back insignificant. Any help is much appreciated.

Hi @resirca52009,

Is it possible that indicator needs TickData? If so, you can probably only test it under Replay mode. Back testing and strategy testing only provides bar data, not tick data, back to the strategy.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
The following user says Thank You to NJAMC for this post:
 
  #3 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


Sorry,

I am not sure my message above is relevant, I don't know anything about MetaTrader, I was thinking the question was about NinjaTrader.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
 
  #4 (permalink)
Elite Member
Indianapolis, Indiana/ USA
 
Futures Experience: Advanced
Platform: MT4, Ninjatrader
Broker/Data: AMP / CQG
Favorite Futures: Futures
 
Posts: 45 since Oct 2012
Thanks: 110 given, 13 received


NJAMC View Post
Hi @resirca52009,

Is it possible that indicator needs TickData? If so, you can probably only test it under Replay mode. Back testing and strategy testing only provides bar data, not tick data, back to the strategy.

NJAMC,

Thanks for the reply & links; I'll review it.......

Reply With Quote

Reply



futures io > > > > Buy / Sell Code Problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to buy/sell if market is +5/-5 at exact time tradersheldon EasyLanguage Programming 3 June 14th, 2012 01:37 PM
Outside Bar buy or sell ness1g NinjaTrader 7 March 7th, 2012 07:18 PM
Is it possible to show Buy/Sell strength in NT6.5? steveg NinjaTrader 1 March 15th, 2011 01:40 PM
[NinjaTrader]    buy sell chart jamfutures Platforms and Indicators 10 July 14th, 2010 08:36 PM
Buy/Sell in an indicator Mindset NinjaTrader Programming 11 October 8th, 2009 10:16 AM


All times are GMT -4. The time now is 07:21 AM.

Copyright © 2017 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
Page generated 2017-12-16 in 0.10 seconds with 19 queries on phoenix via your IP 54.226.113.250