Enter signal cross equity

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Enter signal cross equity

Postby turbofib » 30 Mar 2018

hi, it's possible to study equity and entry in the market when equity cross over Sma (it's an example)

How can i do it?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Enter signal cross equity

Postby TJ » 30 Mar 2018

hi, it's possible to study equity and entry in the market when equity cross over Sma (it's an example)

How can i do it?

You have to give a more detailed description.

First step -- draw a diagram to illustrate your idea

2nd step -- draw a flow chart

Next step -- write out your strategy in a step-by-step logic

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Enter signal cross equity

Postby turbofib » 30 Mar 2018

Immagine.png
(54.72 KiB) Downloaded 1709 times
Immagine2.png
(107.7 KiB) Downloaded 1709 times
i give you another example

this is the chart and his equity line

i want enter position (long ) when Momentum of line equity(10 period ago) is > of line equity line at this moment

how can i do it?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Enter signal cross equity

Postby TJ » 30 Mar 2018

i give you another example
this is the chart and his equity line
i want enter position (long ) when Momentum of line equity(10 period ago) is > of line equity line at this moment
how can i do it?
If you can imagine it, you can do it.

Next steps -- draw a logic flow chart and write out your strategy in a Step-by-Step logic.

For example:

1. get equity value
2. calculate equity moving average (EMA)
3. compare EMA to . . . .
4. If BUY CONDITION = TRUE then BUY 1 next bar at market


See post #6
viewtopic.php?t=11713

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Enter signal cross equity

Postby turbofib » 30 Mar 2018

I dont understand
You say" if true the buy..."

Ok..but how i code automatic signal to code it?
( automatic in powerlanguage"
It is possible to build bridge from 2 chart signal?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Enter signal cross equity

Postby TJ » 30 Mar 2018

I dont understand
You say" if true the buy..."

...

If BUY CONDITION = TRUE then buy...

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Enter signal cross equity

Postby TJ » 30 Mar 2018


Ok..but how i code automatic signal to code it?
( automatic in powerlanguage"
It is possible to build bridge from 2 chart signal?

First, you have to write out your logic as the example I posted above.

NEXT... convert the logic to EasyLanguage codes.


BUT you must write out your logic in detail.
Right now you have a concept.
The concept is in your head.
I cannot read your head.
You have to write out your logic in STEP-BY-STEP detail.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Enter signal cross equity

Postby turbofib » 30 Mar 2018

I'm sorry but the problem is that I can not explain myself since I speak English with the translator..the problem is not to create the logic
How can I tell the system not to enter when the chart signals are there but to enter only when the equity study?
If equity is created through trade signals, I do not want to trade but wait for the equity study
did you understand what I mean?

MAZINGUER
Posts: 75
Joined: 06 Jan 2017
Has thanked: 9 times
Been thanked: 25 times

Re: Enter signal cross equity

Postby MAZINGUER » 31 Mar 2018

Hi turbofib,

Maybe what you need is to use is a flag. I mean,

Code: Select all


Vars: Flag(false);


If Momentum of line equity(10 period ago) is > of line equity line at this moment then
Flag = true;
else
Flag = false;


If Condition (the entry conditions of your system) and Flag = true then
buy .......

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Enter signal cross equity

Postby turbofib » 31 Mar 2018

Mazinguer thank but the problem is another :(..

The problem is sending the realtime signals to the connected broker (Example Interactive Broker)
The chart generates signals that create the equity...
But these signals contain "buy (Condition), Or sell (Condition) and in this signal the trade is executed because multichart is attached to the broker

Now if i code
"
If Momentum of line equity(10 period ago) is > of line equity line at this moment then
Flag = true;
else
Flag = false;


If Condition (the entry conditions of your system) and Flag = true then
buy .......
"
It is correct but I have already traded before in the signal,instead I want to trade the signal after the study of the equity

maxmax68
Posts: 163
Joined: 20 Nov 2012
Has thanked: 55 times
Been thanked: 48 times

Re: Enter signal cross equity

Postby maxmax68 » 01 Apr 2018

Maybe you can use Mazinguer's suggestion and global variables.
On a chart that does not trade you can put your system and with GV you can pass flag to a chart that submits buy-sell orders

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Enter signal cross equity

Postby turbofib » 01 Apr 2018

Thank you for suggestion
Do you have link for last global variable? I've the link but it's very old

maxmax68
Posts: 163
Joined: 20 Nov 2012
Has thanked: 55 times
Been thanked: 48 times

Re: Enter signal cross equity

Postby maxmax68 » 02 Apr 2018

This answer is a cut and paste from the net: ...
Mike,

Not sure what help you wanted but using global variables itself is very easy. Presuming that GV is installed within Multicharts, here's some code I use to send data from one chart to another:

Indicator in the sending chart:

Code: Select all

if LastBarOnChart and barstatus(1)=2 then
begin
GVSetDouble(1,CumVol);
GVSetDouble(2,CumVolAvg);
GVSetDouble(3,BarNumber);
end;
In the receiving chart strategy or indicator uses:

Code: Select all

CumVol=GVGetDouble(1);
CumVolAvg=GVGetDouble(2);
KaseBarNumber=GVGetDouble(3);
1, 2, and 3 are the addresses for storing the variables. You can also do it by name using different syntax.


Paul

... so, in Multicharts 64 bit you have GV already installed and can use them simply with

Code: Select all

GVSetBoolean(ElementLocation,GVValue)
GVSetFloat(ElementLocation,GVValue)
GVSetDouble(ElementLocation,GVValue)
GVSetInteger(ElementLocation,GVValue)
in the sending signal and

Code: Select all

GVGetBoolean(ElementLocation)
GVGetFloat(ElementLocation)
GVGetDouble(ElementLocation)
GVGetInteger(ElementLocation)
in the receiving signal.
Look in PowerLanguage editor.

Hope this helps.
Massimo


Return to “MultiCharts”