NexusFi: Find Your Edge


Home Menu

 





MultiCharts OR Trading Systems setting


Discussion in MultiCharts

Updated
    1. trending_up 5,695 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 23 posts
    2. attach_file 2 attachments




 
Search this Thread

MultiCharts OR Trading Systems setting

  #11 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4

yes this is my question, how can i exchange the numbers between the systems ?

Thank you again.

best regards

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strategy stop orders partially filled
EasyLanguage Programming
Cheap historycal L1 data for stocks
Stocks and ETFs
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
GFIs1 1 DAX trade per day journal
15 thanks
ApexTraderFunding.com experience and review
15 thanks
EG Indicators
11 thanks
  #12 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

In case you use Global Variables for example, you'd use one set of Global Variables for the systems and their numbers. I would create an input in the system for the system number (or name), the global variable element location for the name and an additional number for the maximum number of systems you are using.

Using the maximum number of systems you can loop through all numbers, retrieve the signal names for each signal and with that you can look up the market positions etc. (which of course needs to be stored in each signal and a set of global variables).
It might sound a bit complicated, but it works well.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #13 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4


yes a little bit, but i m going to understand....

For example:

CODE 1

if (marketposition <>0) then FlagSys1 = true
if (marketposition = 0) then FlagSys1 = false

if (conditionlong and FlagSys2)
buy 1 share....
if (conditionshort and FlagSys2)
sellShort 1 share....

CODE 2

if (marketposition <>0) then FlagSys2 = true
if (marketposition = 0) then FlagSys2 = false

if (conditionlong and FlagSys1)
buy 1 share....
if (conditionshort and FlagSys1)
sellShort 1 share....


Which is the best way to permit to CODE 1 to see FlagSys2 variabile and to CODE 2 to see FlagSys1 variable ?

i need to use data 1 data 2 data 3 data 4 ?

can i use it from different charts ?

Thank you again for your time.

No Erocla

Reply With Quote
  #14 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

There is no need for Data2 etc. unless you use it in your system of course. Let's assume one signal is on chart 1 and a second signal on chart 2.
You use Global Variables so the signal on chart 2 knows the market position on chart 1 (or what ever you want to check for).
If the signal on chart 1 is in a position you can use this information to block the execution on chart 2.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #15 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4

Ok perfect, and thx again for your time !

"You use Global Variables", this is the problem, how can i use/build it ?

best regards

no erocla

Reply With Quote
  #16 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Did you take a look at the document and demo code that comes with the Global Variables? If you don't have it, I can upload it here.

Follow me on Twitter Reply With Quote
  #17 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4

No i don' t have any idea, i'm new of MC and i just know how to build strategies.

If u can post it please !

Thank you ABCTG

Reply With Quote
  #18 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Here you go, this should contain everything to get you going.

Attached Files
Elite Membership required to download: Global Variable 2.3.doc
Elite Membership required to download: GV 2-3.ELD
Follow me on Twitter Reply With Quote
Thanked by:
  #19 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4

Hello again,

i tried to do it:


CODE 1

 
Code
                            
var: Num_GV_1(0),flagma(0),flagsto(0);
Num_GV_1 GVSetInteger(2,flagma);
flagsto GVGetInteger(1);

    IF ( 
marketposition <> 0then
    flagma 
1;
    if (
marketposition 0then
    flagma 
0;
    
condition2 c CROSS ABOVE Average(C,8);
condition3 c CROSS BELOW Average(C,8);

IF (
marketposition <> and CONDITION2 and flagsto 0then
    BUY 
"malong" 1 share NEXT BAR AT MARKET;

IF (
marketposition <> -and CONDITION3 and flagsto 0)  then 
    SELLSHORT 
"mashort" )  1 share NEXT BAR AT MARKET;

    IF ( 
marketposition =  and c CROSS BELOW Average(C,8)  ) then 
    SELL 
"masell" from entry ("malong"1 share NEXT BAR AT MARKET;

    IF ( 
marketposition = -and c CROSS ABOVE Average(C,8) ) then 
    BUYTOCOVER 
"macover" from entry ("mashort"1 share NEXT BAR AT MARKET

CODE 2

 
Code
                            
var: Num_GV_1(0),flagma(0),flagsto(0);
Num_GV_1 GVSetInteger(1,flagsto);
flagma GVGetInteger(2) ;
    IF ( 
marketposition <> 0then
    flagsto 
1;
    if (
marketposition 0then
    flagsto 
0;
    
condition2 rsi(c,14) < 40;
condition3 rsi(c,14) > 60;

IF ( 
marketposition <> and CONDITION2 AND flagma then  
    BUY 
"RSILONG" 1 share NEXT BAR AT MARKET;
        
IF ( 
marketposition <> -and CONDITION3  AND flagma 0then 
    SELLSHORT 
"RSISHORT" )  1 share NEXT BAR AT MARKET;
    
    IF ( 
marketposition =  and rsi(c,14)>50 then 
    SELL 
"RSISELL" from entry ("RSILONG"1 share NEXT BAR AT MARKET;

    IF ( 
marketposition = -and rsi(c,14)<50 then 
    BUYTOCOVER 
"RSICOVER" from entry ("RSISHORT"1 share NEXT BAR AT MARKET

this should let the system to buy/short only if flag is = 0, but it doesn t work, in backtesting and in paper trading neither, 0 operations.

Anyone can help me ? what i did wrong ?

Thx again !

Reply With Quote
  #20 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4


Wait wait !

On paper trading seems that it works correctly, nice, Systems works in OR.

is the code correct for you ?

thank you for you time and this thread.

Reply With Quote




Last Updated on June 6, 2013


© 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