NexusFi: Find Your Edge


Home Menu

 





Sesonal trading


Discussion in MultiCharts

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




 
Search this Thread
  #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?
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
White House Drops First Alien Files Today -- Market Says …
Prediction Markets & Event Contracts
CFTC Approves First US Bitcoin Perpetual Futures -- Kals …
Traders Hideout
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
2 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X 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,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X Reply With Quote




Last Updated on November 17, 2015


© 2026 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 - Downloads - Top
no new posts