NexusFi: Find Your Edge


Home Menu

 





Sesonal trading


Discussion in MultiCharts

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




 
Search this Thread

Sesonal trading

  #1 (permalink)
Andreas021
Stockholm
 
Posts: 2 since Nov 2015
Thanks Given: 1
Thanks Received: 0

Hey!

* Iīm new to MultiCharts and trying to code a seasonal code that only applies for specific months. Iīve tried everything, not sure if it works?

* The average buy down (100 shares) does not work either. Anyone knows?
(The conditions look different since I tried them both without sucess)

This is the code;

Inputs:
Length (24);

Condition1 = c > average (c,200);
Condition2 = Month(currentdate)<> 5;
Condition3 = Month(currentdate)<> Month (6);
Condition4 = Month(currentdate)<> Month (7);
Condition5 = Month(currentdate)<> Month (8);


if marketposition = 0 then begin

if rsi (c,length) <= 30 and condition1 and condition2 and condition3 and condition4 and condition5 then begin
buy ("Enter long 50") 50 shares next bar at market;

end;
end;

if marketposition = 1 then begin
if rsi (c, length) <= 20 and condition1 then begin
buy ("Enter long 100") 100 shares this bar at close;

end;
end;


if rsi(c,length) >= 55 then sell this bar at close;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Quantum physics & Trading dynamics
The Elite Circle
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Andreas021,

you should look into the reserved word "currentdate" and what it returns - assuming you also want to be able to backtest your code of course.
What are your settings for multiple entries into the same position? Maybe you are just blocking more than one entry.

Regards,

ABCTG


Andreas021 View Post
Hey!

* Iīm new to MultiCharts and trying to code a seasonal code that only applies for specific months. Iīve tried everything, not sure if it works?

* The average buy down (100 shares) does not work either. Anyone knows?
(The conditions look different since I tried them both without sucess)

This is the code;

Inputs:
Length (24);

Condition1 = c > average (c,200);
Condition2 = Month(currentdate)<> 5;
Condition3 = Month(currentdate)<> Month (6);
Condition4 = Month(currentdate)<> Month (7);
Condition5 = Month(currentdate)<> Month (8);


if marketposition = 0 then begin

if rsi (c,length) <= 30 and condition1 and condition2 and condition3 and condition4 and condition5 then begin
buy ("Enter long 50") 50 shares next bar at market;

end;
end;

if marketposition = 1 then begin
if rsi (c, length) <= 20 and condition1 then begin
buy ("Enter long 100") 100 shares this bar at close;

end;
end;


if rsi(c,length) >= 55 then sell this bar at close;


Follow me on Twitter Reply With Quote
  #3 (permalink)
Andreas021
Stockholm
 
Posts: 2 since Nov 2015
Thanks Given: 1
Thanks Received: 0


Currentdate returns a number;

The value wil be 1081030 if the current date is October 30th, 2008.

The 108 is the number of years ago form the reference so the 108[10]30 means the month. Since the <> 5 didnīt work I tried:

condition2 = currentdate(month) <> 500;

and condition2 = Month (currentdate) <>500;

and condition2 = month <> 500;

Still doesnt work.

Regarding the multiple entries I have to look into that further, no instructions are found but it seems I have to defined the entries as parameters in the inputs.

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

Andreas021,

that's correct, but you seem to miss the most important part in the definition. It doesn't return the chart date, but the current (i.e. today's) date of your computer, which most likely will be the same over all the bars on your chart.

Regards,
ABCTG


Andreas021 View Post
Currentdate returns a number;

The value wil be 1081030 if the current date is October 30th, 2008.

The 108 is the number of years ago form the reference so the 108[10]30 means the month. Since the <> 5 didnīt work I tried:

condition2 = currentdate(month) <> 500;

and condition2 = Month (currentdate) <>500;

and condition2 = month <> 500;

Still doesnt work.

Regarding the multiple entries I have to look into that further, no instructions are found but it seems I have to defined the entries as parameters in the inputs.


Follow me on Twitter Reply With Quote




Last Updated on November 17, 2015


© 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